/*! @maps4html/web-map-custom-element 29-04-2024 */

!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i((t="undefined"!=typeof globalThis?globalThis:t||self).leaflet={})}(this,function(t){"use strict";function l(t){for(var i,e,s=1,n=arguments.length;s<n;s++)for(i in e=arguments[s])t[i]=e[i];return t}var o=Object.create||function(t){return i.prototype=t,new i};function i(){}function r(t,i){var e=Array.prototype.slice;if(t.bind)return t.bind.apply(t,e.call(arguments,1));var s=e.call(arguments,2);return function(){return t.apply(i,s.length?s.concat(e.call(arguments)):arguments)}}var e=0;function h(t){return"_leaflet_id"in t||(t._leaflet_id=++e),t._leaflet_id}function s(t,i,e){var s,n,o=function(){s=!1,n&&(a.apply(e,n),n=!1)},a=function(){s?n=arguments:(t.apply(e,arguments),setTimeout(o,i),s=!0)};return a}function n(t,i,e){var s=i[1],n=i[0],i=s-n;return t===s&&e?t:((t-n)%i+i)%i+n}function c(){return!1}function a(t,i){if(!1===i)return t;i=Math.pow(10,void 0===i?6:i);return Math.round(t*i)/i}function u(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function d(t){return u(t).split(/\s+/)}function _(t,i){for(var e in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?o(t.options):{}),i)t.options[e]=i[e];return t.options}function p(t,i,e){var s,n=[];for(s in t)n.push(encodeURIComponent(e?s.toUpperCase():s)+"="+encodeURIComponent(t[s]));return(i&&-1!==i.indexOf("?")?"&":"?")+n.join("&")}var m=/\{ *([\w_ -]+) *\}/g;function f(t,e){return t.replace(m,function(t,i){i=e[i];if(void 0===i)throw new Error("No value provided for variable "+t);return i="function"==typeof i?i(e):i})}var g=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function v(t,i){for(var e=0;e<t.length;e++)if(t[e]===i)return e;return-1}var y="";function M(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var x=0;function w(t){var i=+new Date,e=Math.max(0,16-(i-x));return x=i+e,window.setTimeout(t,e)}var b=window.requestAnimationFrame||M("RequestAnimationFrame")||w,P=window.cancelAnimationFrame||M("CancelAnimationFrame")||M("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function C(t,i,e){if(!e||b!==w)return b.call(window,r(t,i));t.call(i)}function T(t){t&&P.call(window,t)}var S={__proto__:null,extend:l,create:o,bind:r,get lastId(){return e},stamp:h,throttle:s,wrapNum:n,falseFn:c,formatNum:a,trim:u,splitWords:d,setOptions:_,getParamString:p,template:f,isArray:g,indexOf:v,emptyImageUrl:y,requestFn:b,cancelFn:P,requestAnimFrame:C,cancelAnimFrame:T};function E(){}E.extend=function(t){function i(){_(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()}var e,s=i.__super__=this.prototype,n=o(s);for(e in(n.constructor=i).prototype=n,this)Object.prototype.hasOwnProperty.call(this,e)&&"prototype"!==e&&"__super__"!==e&&(i[e]=this[e]);return t.statics&&l(i,t.statics),t.includes&&(function(t){if("undefined"!=typeof L&&L&&L.Mixin){t=g(t)?t:[t];for(var i=0;i<t.length;i++)t[i]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}(t.includes),l.apply(null,[n].concat(t.includes))),l(n,t),delete n.statics,delete n.includes,n.options&&(n.options=s.options?o(s.options):{},l(n.options,t.options)),n._initHooks=[],n.callInitHooks=function(){if(!this._initHooksCalled){s.callInitHooks&&s.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,i=n._initHooks.length;t<i;t++)n._initHooks[t].call(this)}},i},E.include=function(t){var i=this.prototype.options;return l(this.prototype,t),t.options&&(this.prototype.options=i,this.mergeOptions(t.options)),this},E.mergeOptions=function(t){return l(this.prototype.options,t),this},E.addInitHook=function(t){var i=Array.prototype.slice.call(arguments,1),e="function"==typeof t?t:function(){this[t].apply(this,i)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(e),this};var k={on:function(t,i,e){if("object"==typeof t)for(var s in t)this._on(s,t[s],i);else for(var n=0,o=(t=d(t)).length;n<o;n++)this._on(t[n],i,e);return this},off:function(t,i,e){if(arguments.length)if("object"==typeof t)for(var s in t)this._off(s,t[s],i);else{t=d(t);for(var n=1===arguments.length,o=0,a=t.length;o<a;o++)n?this._off(t[o]):this._off(t[o],i,e)}else delete this._events;return this},_on:function(t,i,e,s){"function"==typeof i?!1===this._listens(t,i,e)&&(e={fn:i,ctx:e=e===this?void 0:e},s&&(e.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(e)):console.warn("wrong listener type: "+typeof i)},_off:function(t,i,e){var s,n,o,a;if(this._events&&(s=this._events[t]))if(1!==arguments.length)"function"==typeof i?!1!==(a=this._listens(t,i,e))&&(e=s[a],this._firingCount&&(e.fn=c,this._events[t]=s=s.slice()),s.splice(a,1)):console.warn("wrong listener type: "+typeof i);else{if(this._firingCount)for(n=0,o=s.length;n<o;n++)s[n].fn=c;delete this._events[t]}},fire:function(t,i,e){if(!this.listens(t,e))return this;var s=l({},i,{type:t,target:this,sourceTarget:i&&i.sourceTarget||this});if(this._events){var n=this._events[t];if(n){this._firingCount=this._firingCount+1||1;for(var o=0,a=n.length;o<a;o++){var r=n[o],h=r.fn;r.once&&this.off(t,h,r.ctx),h.call(r.ctx||this,s)}this._firingCount--}}return e&&this._propagateEvent(s),this},listens:function(t,i,e,s){"string"!=typeof t&&console.warn('"string" type argument expected');var n=i;"function"!=typeof i&&(s=!!i,e=n=void 0);var o=this._events&&this._events[t];if(o&&o.length&&!1!==this._listens(t,n,e))return!0;if(s)for(var a in this._eventParents)if(this._eventParents[a].listens(t,i,e,s))return!0;return!1},_listens:function(t,i,e){if(!this._events)return!1;var s=this._events[t]||[];if(!i)return!!s.length;e===this&&(e=void 0);for(var n=0,o=s.length;n<o;n++)if(s[n].fn===i&&s[n].ctx===e)return n;return!1},once:function(t,i,e){if("object"==typeof t)for(var s in t)this._on(s,t[s],i,!0);else for(var n=0,o=(t=d(t)).length;n<o;n++)this._on(t[n],i,e,!0);return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[h(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[h(t)],this},_propagateEvent:function(t){for(var i in this._eventParents)this._eventParents[i].fire(t.type,l({layer:t.target,propagatedFrom:t.target},t),!0)}};k.addEventListener=k.on,k.removeEventListener=k.clearAllEventListeners=k.off,k.addOneTimeEventListener=k.once,k.fireEvent=k.fire,k.hasEventListeners=k.listens;var z=E.extend(k);function A(t,i,e){this.x=e?Math.round(t):t,this.y=e?Math.round(i):i}var O=Math.trunc||function(t){return 0<t?Math.floor(t):Math.ceil(t)};function I(t,i,e){return t instanceof A?t:g(t)?new A(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new A(t.x,t.y):new A(t,i,e)}function Z(t,i){if(t)for(var e=i?[t,i]:t,s=0,n=e.length;s<n;s++)this.extend(e[s])}function B(t,i){return!t||t instanceof Z?t:new Z(t,i)}function N(t,i){if(t)for(var e=i?[t,i]:t,s=0,n=e.length;s<n;s++)this.extend(e[s])}function R(t,i){return t instanceof N?t:new N(t,i)}function j(t,i,e){if(isNaN(t)||isNaN(i))throw new Error("Invalid LatLng object: ("+t+", "+i+")");this.lat=+t,this.lng=+i,void 0!==e&&(this.alt=+e)}function D(t,i,e){return t instanceof j?t:g(t)&&"object"!=typeof t[0]?3===t.length?new j(t[0],t[1],t[2]):2===t.length?new j(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new j(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===i?null:new j(t,i,e)}A.prototype={clone:function(){return new A(this.x,this.y)},add:function(t){return this.clone()._add(I(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(I(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new A(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new A(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=O(this.x),this.y=O(this.y),this},distanceTo:function(t){var i=(t=I(t)).x-this.x,t=t.y-this.y;return Math.sqrt(i*i+t*t)},equals:function(t){return(t=I(t)).x===this.x&&t.y===this.y},contains:function(t){return t=I(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+a(this.x)+", "+a(this.y)+")"}},Z.prototype={extend:function(t){var i,e;if(!t)return this;if(t instanceof A||"number"==typeof t[0]||"x"in t)i=e=I(t);else if(i=(t=B(t)).min,e=t.max,!i||!e)return this;return this.min||this.max?(this.min.x=Math.min(i.x,this.min.x),this.max.x=Math.max(e.x,this.max.x),this.min.y=Math.min(i.y,this.min.y),this.max.y=Math.max(e.y,this.max.y)):(this.min=i.clone(),this.max=e.clone()),this},getCenter:function(t){return I((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return I(this.min.x,this.max.y)},getTopRight:function(){return I(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var i,e;return(t=("number"==typeof t[0]||t instanceof A?I:B)(t))instanceof Z?(i=t.min,e=t.max):i=e=t,i.x>=this.min.x&&e.x<=this.max.x&&i.y>=this.min.y&&e.y<=this.max.y},intersects:function(t){t=B(t);var i=this.min,e=this.max,s=t.min,n=t.max,t=n.x>=i.x&&s.x<=e.x,e=n.y>=i.y&&s.y<=e.y;return t&&e},overlaps:function(t){t=B(t);var i=this.min,e=this.max,s=t.min,n=t.max,t=n.x>i.x&&s.x<e.x,e=n.y>i.y&&s.y<e.y;return t&&e},isValid:function(){return!(!this.min||!this.max)},pad:function(t){var i=this.min,e=this.max,s=Math.abs(i.x-e.x)*t,t=Math.abs(i.y-e.y)*t;return B(I(i.x-s,i.y-t),I(e.x+s,e.y+t))},equals:function(t){return!!t&&(t=B(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight()))}},N.prototype={extend:function(t){var i,e,s=this._southWest,n=this._northEast;if(t instanceof j)e=i=t;else{if(!(t instanceof N))return t?this.extend(D(t)||R(t)):this;if(i=t._southWest,e=t._northEast,!i||!e)return this}return s||n?(s.lat=Math.min(i.lat,s.lat),s.lng=Math.min(i.lng,s.lng),n.lat=Math.max(e.lat,n.lat),n.lng=Math.max(e.lng,n.lng)):(this._southWest=new j(i.lat,i.lng),this._northEast=new j(e.lat,e.lng)),this},pad:function(t){var i=this._southWest,e=this._northEast,s=Math.abs(i.lat-e.lat)*t,t=Math.abs(i.lng-e.lng)*t;return new N(new j(i.lat-s,i.lng-t),new j(e.lat+s,e.lng+t))},getCenter:function(){return new j((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new j(this.getNorth(),this.getWest())},getSouthEast:function(){return new j(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t=("number"==typeof t[0]||t instanceof j||"lat"in t?D:R)(t);var i,e,s=this._southWest,n=this._northEast;return t instanceof N?(i=t.getSouthWest(),e=t.getNorthEast()):i=e=t,i.lat>=s.lat&&e.lat<=n.lat&&i.lng>=s.lng&&e.lng<=n.lng},intersects:function(t){t=R(t);var i=this._southWest,e=this._northEast,s=t.getSouthWest(),n=t.getNorthEast(),t=n.lat>=i.lat&&s.lat<=e.lat,e=n.lng>=i.lng&&s.lng<=e.lng;return t&&e},overlaps:function(t){t=R(t);var i=this._southWest,e=this._northEast,s=t.getSouthWest(),n=t.getNorthEast(),t=n.lat>i.lat&&s.lat<e.lat,e=n.lng>i.lng&&s.lng<e.lng;return t&&e},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,i){return!!t&&(t=R(t),this._southWest.equals(t.getSouthWest(),i)&&this._northEast.equals(t.getNorthEast(),i))},isValid:function(){return!(!this._southWest||!this._northEast)}};var q={latLngToPoint:function(t,i){t=this.projection.project(t),i=this.scale(i);return this.transformation._transform(t,i)},pointToLatLng:function(t,i){i=this.scale(i),i=this.transformation.untransform(t,i);return this.projection.unproject(i)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var i=this.projection.bounds,t=this.scale(t);return new Z(this.transformation.transform(i.min,t),this.transformation.transform(i.max,t))},infinite:!(j.prototype={equals:function(t,i){return!!t&&(t=D(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===i?1e-9:i))},toString:function(t){return"LatLng("+a(this.lat,t)+", "+a(this.lng,t)+")"},distanceTo:function(t){return G.distance(this,D(t))},wrap:function(){return G.wrapLatLng(this)},toBounds:function(t){var i=180*t/40075017,t=i/Math.cos(Math.PI/180*this.lat);return R([this.lat-i,this.lng-t],[this.lat+i,this.lng+t])},clone:function(){return new j(this.lat,this.lng,this.alt)}}),wrapLatLng:function(t){var i=this.wrapLng?n(t.lng,this.wrapLng,!0):t.lng;return new j(this.wrapLat?n(t.lat,this.wrapLat,!0):t.lat,i,t.alt)},wrapLatLngBounds:function(t){var i=t.getCenter(),e=this.wrapLatLng(i),s=i.lat-e.lat,i=i.lng-e.lng;if(0==s&&0==i)return t;e=t.getSouthWest(),t=t.getNorthEast();return new N(new j(e.lat-s,e.lng-i),new j(t.lat-s,t.lng-i))}},G=l({},q,{wrapLng:[-180,180],R:6371e3,distance:function(t,i){var e=Math.PI/180,s=t.lat*e,n=i.lat*e,o=Math.sin((i.lat-t.lat)*e/2),e=Math.sin((i.lng-t.lng)*e/2),e=o*o+Math.cos(s)*Math.cos(n)*e*e,e=2*Math.atan2(Math.sqrt(e),Math.sqrt(1-e));return this.R*e}}),F=6378137,H={R:F,MAX_LATITUDE:85.0511287798,project:function(t){var i=Math.PI/180,e=this.MAX_LATITUDE,e=Math.max(Math.min(e,t.lat),-e),e=Math.sin(e*i);return new A(this.R*t.lng*i,this.R*Math.log((1+e)/(1-e))/2)},unproject:function(t){var i=180/Math.PI;return new j((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*i,t.x*i/this.R)},bounds:new Z([-(Lt=F*Math.PI),-Lt],[Lt,Lt])};function U(t,i,e,s){if(g(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=i,this._c=e,this._d=s}function W(t,i,e,s){return new U(t,i,e,s)}U.prototype={transform:function(t,i){return this._transform(t.clone(),i)},_transform:function(t,i){return t.x=(i=i||1)*(this._a*t.x+this._b),t.y=i*(this._c*t.y+this._d),t},untransform:function(t,i){return new A((t.x/(i=i||1)-this._b)/this._a,(t.y/i-this._d)/this._c)}};var V=l({},G,{code:"EPSG:3857",projection:H,transformation:W(Ct=.5/(Math.PI*H.R),.5,-Ct,.5)}),K=l({},V,{code:"EPSG:900913"});function X(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function J(t,i){for(var e,s,n,o,a="",r=0,h=t.length;r<h;r++){for(e=0,s=(n=t[r]).length;e<s;e++)a+=(e?"L":"M")+(o=n[e]).x+" "+o.y;a+=i?Et.svg?"z":"x":""}return a||"M0 0"}var Q=document.documentElement.style,Y="ActiveXObject"in window,$=Y&&!document.addEventListener,tt="msLaunchUri"in navigator&&!("documentMode"in document),it=St("webkit"),et=St("android"),st=St("android 2")||St("android 3"),nt=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),ot=et&&St("Google")&&nt<537&&!("AudioNode"in window),at=!!window.opera,rt=!tt&&St("chrome"),ht=St("gecko")&&!it&&!at&&!Y,lt=!rt&&St("safari"),ct=St("phantom"),ut="OTransition"in Q,dt=0===navigator.platform.indexOf("Win"),_t=Y&&"transition"in Q,pt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!st,mt="MozPerspective"in Q,ft=!window.L_DISABLE_3D&&(_t||pt||mt)&&!ut&&!ct,gt="undefined"!=typeof orientation||St("mobile"),vt=gt&&it,yt=gt&&pt,Mt=!window.PointerEvent&&window.MSPointerEvent,xt=!(!window.PointerEvent&&!Mt),wt="ontouchstart"in window||!!window.TouchEvent,bt=!window.L_NO_TOUCH&&(wt||xt),Pt=gt&&at,F=gt&&ht,Lt=1<(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI),Ct=function(){var t=!1;try{var i=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",c,i),window.removeEventListener("testPassiveEventSupport",c,i)}catch(t){}return t}(),nt=!!document.createElement("canvas").getContext,Q=!(!document.createElementNS||!X("svg").createSVGRect),Tt=!!Q&&((Tt=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(Tt.firstChild&&Tt.firstChild.namespaceURI));function St(t){return 0<=navigator.userAgent.toLowerCase().indexOf(t)}var Et={ie:Y,ielt9:$,edge:tt,webkit:it,android:et,android23:st,androidStock:ot,opera:at,chrome:rt,gecko:ht,safari:lt,phantom:ct,opera12:ut,win:dt,ie3d:_t,webkit3d:pt,gecko3d:mt,any3d:ft,mobile:gt,mobileWebkit:vt,mobileWebkit3d:yt,msPointer:Mt,pointer:xt,touch:bt,touchNative:wt,mobileOpera:Pt,mobileGecko:F,retina:Lt,passiveEvents:Ct,canvas:nt,svg:Q,vml:!Q&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(t){return!1}}(),inlineSvg:Tt,mac:0===navigator.platform.indexOf("Mac"),linux:0===navigator.platform.indexOf("Linux")},kt=Et.msPointer?"MSPointerDown":"pointerdown",zt=Et.msPointer?"MSPointerMove":"pointermove",At=Et.msPointer?"MSPointerUp":"pointerup",Ot=Et.msPointer?"MSPointerCancel":"pointercancel",It={touchstart:kt,touchmove:zt,touchend:At,touchcancel:Ot},Zt={touchstart:function(t,i){i.MSPOINTER_TYPE_TOUCH&&i.pointerType===i.MSPOINTER_TYPE_TOUCH&&Oi(i);Gt(t,i)},touchmove:Gt,touchend:Gt,touchcancel:Gt},Bt={},Nt=!1;function Rt(t,i,e){return"touchstart"===i&&(Nt||(document.addEventListener(kt,jt,!0),document.addEventListener(zt,Dt,!0),document.addEventListener(At,qt,!0),document.addEventListener(Ot,qt,!0),Nt=!0)),Zt[i]?(e=Zt[i].bind(this,e),t.addEventListener(It[i],e,!1),e):(console.warn("wrong event specified:",i),c)}function jt(t){Bt[t.pointerId]=t}function Dt(t){Bt[t.pointerId]&&(Bt[t.pointerId]=t)}function qt(t){delete Bt[t.pointerId]}function Gt(t,i){if(i.pointerType!==(i.MSPOINTER_TYPE_MOUSE||"mouse")){for(var e in i.touches=[],Bt)i.touches.push(Bt[e]);i.changedTouches=[i],t(i)}}var Ft=200;function Ht(t,e){t.addEventListener("dblclick",e);var s,n=0;function i(t){var i;1===t.detail?"mouse"===t.pointerType||t.sourceCapabilities&&!t.sourceCapabilities.firesTouchEvents||((i=Zi(t)).some(function(t){return t instanceof HTMLLabelElement&&t.attributes.for})&&!i.some(function(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement})||((i=Date.now())-n<=Ft?2===++s&&e(function(t){var i,e,s={};for(e in t)i=t[e],s[e]=i&&i.bind?i.bind(t):i;return(t=s).type="dblclick",s.detail=2,s.isTrusted=!1,s._simulated=!0,s}(t)):s=1,n=i)):s=t.detail}return t.addEventListener("click",i),{dblclick:e,simDblclick:i}}var Ut,Wt,Vt,Kt,Xt,Jt,Qt=_i(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Yt=_i(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),$t="webkitTransition"===Yt||"OTransition"===Yt?Yt+"End":"transitionend";function ti(t){return"string"==typeof t?document.getElementById(t):t}function ii(t,i){var e=t.style[i]||t.currentStyle&&t.currentStyle[i];return"auto"===(e=(!e||"auto"===e)&&document.defaultView?(t=document.defaultView.getComputedStyle(t,null))?t[i]:null:e)?null:e}function ei(t,i,e){t=document.createElement(t);return t.className=i||"",e&&e.appendChild(t),t}function si(t){var i=t.parentNode;i&&i.removeChild(t)}function ni(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function oi(t){var i=t.parentNode;i&&i.lastChild!==t&&i.appendChild(t)}function ai(t){var i=t.parentNode;i&&i.firstChild!==t&&i.insertBefore(t,i.firstChild)}function ri(t,i){if(void 0!==t.classList)return t.classList.contains(i);t=ui(t);return 0<t.length&&new RegExp("(^|\\s)"+i+"(\\s|$)").test(t)}function hi(t,i){var e;if(void 0!==t.classList)for(var s=d(i),n=0,o=s.length;n<o;n++)t.classList.add(s[n]);else ri(t,i)||ci(t,((e=ui(t))?e+" ":"")+i)}function li(t,i){void 0!==t.classList?t.classList.remove(i):ci(t,u((" "+ui(t)+" ").replace(" "+i+" "," ")))}function ci(t,i){void 0===t.className.baseVal?t.className=i:t.className.baseVal=i}function ui(t){return void 0===(t=t.correspondingElement?t.correspondingElement:t).className.baseVal?t.className:t.className.baseVal}function di(t,i){"opacity"in t.style?t.style.opacity=i:"filter"in t.style&&function(t,i){var e=!1,s="DXImageTransform.Microsoft.Alpha";try{e=t.filters.item(s)}catch(t){if(1===i)return}i=Math.round(100*i),e?(e.Enabled=100!==i,e.Opacity=i):t.style.filter+=" progid:"+s+"(opacity="+i+")"}(t,i)}function _i(t){for(var i=document.documentElement.style,e=0;e<t.length;e++)if(t[e]in i)return t[e];return!1}function pi(t,i,e){i=i||new A(0,0);t.style[Qt]=(Et.ie3d?"translate("+i.x+"px,"+i.y+"px)":"translate3d("+i.x+"px,"+i.y+"px,0)")+(e?" scale("+e+")":"")}function mi(t,i){t._leaflet_pos=i,Et.any3d?pi(t,i):(t.style.left=i.x+"px",t.style.top=i.y+"px")}function fi(t){return t._leaflet_pos||new A(0,0)}function gi(){bi(window,"dragstart",Oi)}function vi(){Li(window,"dragstart",Oi)}function yi(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Mi(),Jt=(Xt=t).style.outlineStyle,t.style.outlineStyle="none",bi(window,"keydown",Mi))}function Mi(){Xt&&(Xt.style.outlineStyle=Jt,Jt=Xt=void 0,Li(window,"keydown",Mi))}function xi(t){for(;!((t=t.parentNode).offsetWidth&&t.offsetHeight||t===document.body););return t}function wi(t){var i=t.getBoundingClientRect();return{x:i.width/t.offsetWidth||1,y:i.height/t.offsetHeight||1,boundingClientRect:i}}Kt="onselectstart"in document?(Vt=function(){bi(window,"selectstart",Oi)},function(){Li(window,"selectstart",Oi)}):(Wt=_i(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]),Vt=function(){var t;Wt&&(t=document.documentElement.style,Ut=t[Wt],t[Wt]="none")},function(){Wt&&(document.documentElement.style[Wt]=Ut,Ut=void 0)});yt={__proto__:null,TRANSFORM:Qt,TRANSITION:Yt,TRANSITION_END:$t,get:ti,getStyle:ii,create:ei,remove:si,empty:ni,toFront:oi,toBack:ai,hasClass:ri,addClass:hi,removeClass:li,setClass:ci,getClass:ui,setOpacity:di,testProp:_i,setTransform:pi,setPosition:mi,getPosition:fi,get disableTextSelection(){return Vt},get enableTextSelection(){return Kt},disableImageDrag:gi,enableImageDrag:vi,preventOutline:yi,restoreOutline:Mi,getSizedParentNode:xi,getScale:wi};function bi(t,i,e,s){if(i&&"object"==typeof i)for(var n in i)Si(t,n,i[n],e);else for(var o=0,a=(i=d(i)).length;o<a;o++)Si(t,i[o],e,s);return this}var Pi="_leaflet_events";function Li(t,i,e,s){if(1===arguments.length)Ci(t),delete t[Pi];else if(i&&"object"==typeof i)for(var n in i)Ei(t,n,i[n],e);else if(i=d(i),2===arguments.length)Ci(t,function(t){return-1!==v(i,t)});else for(var o=0,a=i.length;o<a;o++)Ei(t,i[o],e,s);return this}function Ci(t,i){for(var e in t[Pi]){var s=e.split(/\d/)[0];i&&!i(s)||Ei(t,s,null,null,e)}}var Ti={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Si(i,t,e,s){var n=t+h(e)+(s?"_"+h(s):"");if(i[Pi]&&i[Pi][n])return this;var o=function(t){return e.call(s||i,t||window.event)},a=o;!Et.touchNative&&Et.pointer&&0===t.indexOf("touch")?o=Rt(i,t,o):Et.touch&&"dblclick"===t?o=Ht(i,o):"addEventListener"in i?"touchstart"===t||"touchmove"===t||"wheel"===t||"mousewheel"===t?i.addEventListener(Ti[t]||t,o,!!Et.passiveEvents&&{passive:!1}):"mouseenter"===t||"mouseleave"===t?i.addEventListener(Ti[t],o=function(t){t=t||window.event,ji(i,t)&&a(t)},!1):i.addEventListener(t,a,!1):i.attachEvent("on"+t,o),i[Pi]=i[Pi]||{},i[Pi][n]=o}function Ei(t,i,e,s,n){n=n||i+h(e)+(s?"_"+h(s):"");var o,a,e=t[Pi]&&t[Pi][n];if(!e)return this;!Et.touchNative&&Et.pointer&&0===i.indexOf("touch")?(s=t,a=e,It[o=i]?s.removeEventListener(It[o],a,!1):console.warn("wrong event specified:",o)):Et.touch&&"dblclick"===i?(a=e,(o=t).removeEventListener("dblclick",a.dblclick),o.removeEventListener("click",a.simDblclick)):"removeEventListener"in t?t.removeEventListener(Ti[i]||i,e,!1):t.detachEvent("on"+i,e),t[Pi][n]=null}function ki(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function zi(t){return Si(t,"wheel",ki),this}function Ai(t){return bi(t,"mousedown touchstart dblclick contextmenu",ki),t._leaflet_disable_click=!0,this}function Oi(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Ii(t){return Oi(t),ki(t),this}function Zi(t){if(t.composedPath)return t.composedPath();for(var i=[],e=t.target;e;)i.push(e),e=e.parentNode;return i}function Bi(t,i){if(!i)return new A(t.clientX,t.clientY);var e=wi(i),s=e.boundingClientRect;return new A((t.clientX-s.left)/e.x-i.clientLeft,(t.clientY-s.top)/e.y-i.clientTop)}var Ni=Et.linux&&Et.chrome?window.devicePixelRatio:Et.mac?3*window.devicePixelRatio:0<window.devicePixelRatio?2*window.devicePixelRatio:1;function Ri(t){return Et.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Ni:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function ji(t,i){var e=i.relatedTarget;if(!e)return!0;try{for(;e&&e!==t;)e=e.parentNode}catch(t){return!1}return e!==t}var Mt={__proto__:null,on:bi,off:Li,stopPropagation:ki,disableScrollPropagation:zi,disableClickPropagation:Ai,preventDefault:Oi,stop:Ii,getPropagationPath:Zi,getMousePosition:Bi,getWheelDelta:Ri,isExternalTarget:ji,addListener:bi,removeListener:Li},Di=z.extend({run:function(t,i,e,s){this.stop(),this._el=t,this._inProgress=!0,this._duration=e||.25,this._easeOutPower=1/Math.max(s||.5,.2),this._startPos=fi(t),this._offset=i.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=C(this._animate,this),this._step()},_step:function(t){var i=+new Date-this._startTime,e=1e3*this._duration;i<e?this._runFrame(this._easeOut(i/e),t):(this._runFrame(1),this._complete())},_runFrame:function(t,i){t=this._startPos.add(this._offset.multiplyBy(t));i&&t._round(),mi(this._el,t),this.fire("step")},_complete:function(){T(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),qi=z.extend({options:{crs:V,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,i){i=_(this,i),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=r(this._onResize,this),this._initEvents(),i.maxBounds&&this.setMaxBounds(i.maxBounds),void 0!==i.zoom&&(this._zoom=this._limitZoom(i.zoom)),i.center&&void 0!==i.zoom&&this.setView(D(i.center),i.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=Yt&&Et.any3d&&!Et.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),bi(this._proxy,$t,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,i,e){if((i=void 0===i?this._zoom:this._limitZoom(i),t=this._limitCenter(D(t),i,this.options.maxBounds),e=e||{},this._stop(),this._loaded&&!e.reset&&!0!==e)&&(void 0!==e.animate&&(e.zoom=l({animate:e.animate},e.zoom),e.pan=l({animate:e.animate,duration:e.duration},e.pan)),this._zoom!==i?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,i,e.zoom):this._tryAnimatedPan(t,e.pan)))return clearTimeout(this._sizeTimer),this;return this._resetView(t,i,e.pan&&e.pan.noMoveStart),this},setZoom:function(t,i){return this._loaded?this.setView(this.getCenter(),t,{zoom:i}):(this._zoom=t,this)},zoomIn:function(t,i){return t=t||(Et.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,i)},zoomOut:function(t,i){return t=t||(Et.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,i)},setZoomAround:function(t,i,e){var s=this.getZoomScale(i),n=this.getSize().divideBy(2),s=(t instanceof A?t:this.latLngToContainerPoint(t)).subtract(n).multiplyBy(1-1/s),s=this.containerPointToLatLng(n.add(s));return this.setView(s,i,{zoom:e})},_getBoundsCenterZoom:function(t,i){i=i||{},t=t.getBounds?t.getBounds():R(t);var e=I(i.paddingTopLeft||i.padding||[0,0]),s=I(i.paddingBottomRight||i.padding||[0,0]),n=this.getBoundsZoom(t,!1,e.add(s));if((n="number"==typeof i.maxZoom?Math.min(i.maxZoom,n):n)===1/0)return{center:t.getCenter(),zoom:n};s=s.subtract(e).divideBy(2),e=this.project(t.getSouthWest(),n),t=this.project(t.getNorthEast(),n);return{center:this.unproject(e.add(t).divideBy(2).add(s),n),zoom:n}},fitBounds:function(t,i){if(!(t=R(t)).isValid())throw new Error("Bounds are not valid.");t=this._getBoundsCenterZoom(t,i);return this.setView(t.center,t.zoom,i)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,i){return this.setView(t,this._zoom,{pan:i})},panBy:function(t,i){return i=i||{},(t=I(t).round()).x||t.y?(!0===i.animate||this.getSize().contains(t)?(this._panAnim||(this._panAnim=new Di,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),i.noMoveStart||this.fire("movestart"),!1!==i.animate?(hi(this._mapPane,"leaflet-pan-anim"),e=this._getMapPanePos().subtract(t).round(),this._panAnim.run(this._mapPane,e,i.duration||.25,i.easeLinearity)):(this._rawPanBy(t),this.fire("move").fire("moveend"))):this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this):this.fire("moveend");var e},flyTo:function(s,n,t){if(!1===(t=t||{}).animate||!Et.any3d)return this.setView(s,n,t);this._stop();var o=this.project(this.getCenter()),a=this.project(s),i=this.getSize(),r=this._zoom;s=D(s),n=void 0===n?r:n;var h=Math.max(i.x,i.y),e=h*this.getZoomScale(r,n),l=a.distanceTo(o)||1,c=1.42,u=c*c;function d(t){t=(e*e-h*h+(t?-1:1)*u*u*l*l)/(2*(t?e:h)*u*l),t=Math.sqrt(t*t+1)-t;return t<1e-9?-18:Math.log(t)}function _(t){return(Math.exp(t)-Math.exp(-t))/2}function p(t){return(Math.exp(t)+Math.exp(-t))/2}var m=d(0);function f(t){return h*(p(m)*(_(t=m+c*t)/p(t))-_(m))/u}var g=Date.now(),v=(d(1)-m)/c,y=t.duration?1e3*t.duration:1e3*v*.8;return this._moveStart(!0,t.noMoveStart),function t(){var i=(Date.now()-g)/y,e=(1-Math.pow(1-i,1.5))*v;i<=1?(this._flyToFrame=C(t,this),this._move(this.unproject(o.add(a.subtract(o).multiplyBy(f(e)/l)),r),this.getScaleZoom(h/(h*(p(m)/p(m+c*e))),r),{flyTo:!0})):this._move(s,n)._moveEnd(!0)}.call(this),this},flyToBounds:function(t,i){t=this._getBoundsCenterZoom(t,i);return this.flyTo(t.center,t.zoom,i)},setMaxBounds:function(t){return t=R(t),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),t.isValid()?(this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(t){var i=this.options.minZoom;return this.options.minZoom=t,this._loaded&&i!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var i=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&i!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,i){this._enforcingBounds=!0;var e=this.getCenter(),t=this._limitCenter(e,this._zoom,R(t));return e.equals(t)||this.panTo(t,i),this._enforcingBounds=!1,this},panInside:function(t,i){var e=I((i=i||{}).paddingTopLeft||i.padding||[0,0]),s=I(i.paddingBottomRight||i.padding||[0,0]),n=this.project(this.getCenter()),o=this.project(t),t=this.getPixelBounds(),e=B([t.min.add(e),t.max.subtract(s)]),t=e.getSize();return e.contains(o)||(this._enforcingBounds=!0,s=o.subtract(e.getCenter()),t=e.extend(o).getSize().subtract(t),n.x+=s.x<0?-t.x:t.x,n.y+=s.y<0?-t.y:t.y,this.panTo(this.unproject(n),i),this._enforcingBounds=!1),this},invalidateSize:function(t){if(!this._loaded)return this;t=l({animate:!1,pan:!0},!0===t?{animate:!0}:t);var i=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var e=this.getSize(),s=i.divideBy(2).round(),n=e.divideBy(2).round(),n=s.subtract(n);return n.x||n.y?(t.animate&&t.pan?this.panBy(n):(t.pan&&this._rawPanBy(n),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(r(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:i,newSize:e})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=l({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var i=r(this._handleGeolocationResponse,this),e=r(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(i,e,t):navigator.geolocation.getCurrentPosition(i,e,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var i;this._container._leaflet_id&&(i=t.code,t=t.message||(1===i?"permission denied":2===i?"position unavailable":"timeout"),this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:i,message:"Geolocation error: "+t+"."}))},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var i,e=new j(t.coords.latitude,t.coords.longitude),s=e.toBounds(2*t.coords.accuracy),n=this._locateOptions;n.setView&&(i=this.getBoundsZoom(s),this.setView(e,n.maxZoom?Math.min(i,n.maxZoom):i));var o,a={latlng:e,bounds:s,timestamp:t.timestamp};for(o in t.coords)"number"==typeof t.coords[o]&&(a[o]=t.coords[o]);this.fire("locationfound",a)}},addHandler:function(t,i){if(!i)return this;i=this[t]=new i(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}for(var t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),si(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(T(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)si(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,i){i=ei("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),i||this._mapPane);return t&&(this._panes[t]=i),i},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new N(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,i,e){t=R(t),e=I(e||[0,0]);var s=this.getZoom()||0,n=this.getMinZoom(),o=this.getMaxZoom(),a=t.getNorthWest(),r=t.getSouthEast(),t=this.getSize().subtract(e),e=B(this.project(r,s),this.project(a,s)).getSize(),r=Et.any3d?this.options.zoomSnap:1,a=t.x/e.x,e=t.y/e.y,e=i?Math.max(a,e):Math.min(a,e),s=this.getScaleZoom(e,s);return r&&(s=Math.round(s/(r/100))*(r/100),s=i?Math.ceil(s/r)*r:Math.floor(s/r)*r),Math.max(n,Math.min(o,s))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new A(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,i){i=this._getTopLeftPoint(t,i);return new Z(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,i){var e=this.options.crs;return i=void 0===i?this._zoom:i,e.scale(t)/e.scale(i)},getScaleZoom:function(t,i){var e=this.options.crs;i=void 0===i?this._zoom:i;i=e.zoom(t*e.scale(i));return isNaN(i)?1/0:i},project:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.latLngToPoint(D(t),i)},unproject:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.pointToLatLng(I(t),i)},layerPointToLatLng:function(t){t=I(t).add(this.getPixelOrigin());return this.unproject(t)},latLngToLayerPoint:function(t){return this.project(D(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(D(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(R(t))},distance:function(t,i){return this.options.crs.distance(D(t),D(i))},containerPointToLayerPoint:function(t){return I(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return I(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){t=this.containerPointToLayerPoint(I(t));return this.layerPointToLatLng(t)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(D(t)))},mouseEventToContainerPoint:function(t){return Bi(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){t=this._container=ti(t);if(!t)throw new Error("Map container not found.");if(t._leaflet_id)throw new Error("Map container is already initialized.");bi(t,"scroll",this._onScroll,this),this._containerId=h(t)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&Et.any3d,hi(t,"leaflet-container"+(Et.touch?" leaflet-touch":"")+(Et.retina?" leaflet-retina":"")+(Et.ielt9?" leaflet-oldie":"")+(Et.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var i=ii(t,"position");"absolute"!==i&&"relative"!==i&&"fixed"!==i&&"sticky"!==i&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),mi(this._mapPane,new A(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(hi(t.markerPane,"leaflet-zoom-hide"),hi(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,i,e){mi(this._mapPane,new A(0,0));var s=!this._loaded;this._loaded=!0,i=this._limitZoom(i),this.fire("viewprereset");var n=this._zoom!==i;this._moveStart(n,e)._move(t,i)._moveEnd(n),this.fire("viewreset"),s&&this.fire("load")},_moveStart:function(t,i){return t&&this.fire("zoomstart"),i||this.fire("movestart"),this},_move:function(t,i,e,s){void 0===i&&(i=this._zoom);var n=this._zoom!==i;return this._zoom=i,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),s?e&&e.pinch&&this.fire("zoom",e):((n||e&&e.pinch)&&this.fire("zoom",e),this.fire("move",e)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return T(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){mi(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={};var i=t?Li:bi;i((this._targets[h(this._container)]=this)._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&i(window,"resize",this._onResize,this),Et.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){T(this._resizeRequest),this._resizeRequest=C(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,i){for(var e,s=[],n="mouseout"===i||"mouseover"===i,o=t.target||t.srcElement,a=!1;o;){if((e=this._targets[h(o)])&&("click"===i||"preclick"===i)&&this._draggableMoved(e)){a=!0;break}if(e&&e.listens(i,!0)){if(n&&!ji(o,t))break;if(s.push(e),n)break}if(o===this._container)break;o=o.parentNode}return s=!(s.length||a||n)&&this.listens(i,!0)?[this]:s},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var i,e=t.target||t.srcElement;!this._loaded||e._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(e)||("mousedown"===(i=t.type)&&yi(e),this._fireDOMEvent(t,i))},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,i,e){"click"===t.type&&((a=l({},t)).type="preclick",this._fireDOMEvent(a,a.type,e));var s=this._findEventTargets(t,i);if(e){for(var n=[],o=0;o<e.length;o++)e[o].listens(i,!0)&&n.push(e[o]);s=n.concat(s)}if(s.length){"contextmenu"===i&&Oi(t);var a,r=s[0],h={originalEvent:t};for("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type&&(a=r.getLatLng&&(!r._radius||r._radius<=10),h.containerPoint=a?this.latLngToContainerPoint(r.getLatLng()):this.mouseEventToContainerPoint(t),h.layerPoint=this.containerPointToLayerPoint(h.containerPoint),h.latlng=a?r.getLatLng():this.layerPointToLatLng(h.layerPoint)),o=0;o<s.length;o++)if(s[o].fire(i,h,!0),h.originalEvent._stopped||!1===s[o].options.bubblingMouseEvents&&-1!==v(this._mouseEvents,i))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,i=this._handlers.length;t<i;t++)this._handlers[t].disable()},whenReady:function(t,i){return this._loaded?t.call(i||this,{target:this}):this.on("load",t,i),this},_getMapPanePos:function(){return fi(this._mapPane)||new A(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,i){return(t&&void 0!==i?this._getNewPixelOrigin(t,i):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,i){var e=this.getSize()._divideBy(2);return this.project(t,i)._subtract(e)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,i,e){e=this._getNewPixelOrigin(e,i);return this.project(t,i)._subtract(e)},_latLngBoundsToNewLayerBounds:function(t,i,e){e=this._getNewPixelOrigin(e,i);return B([this.project(t.getSouthWest(),i)._subtract(e),this.project(t.getNorthWest(),i)._subtract(e),this.project(t.getSouthEast(),i)._subtract(e),this.project(t.getNorthEast(),i)._subtract(e)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,i,e){if(!e)return t;var s=this.project(t,i),n=this.getSize().divideBy(2),n=new Z(s.subtract(n),s.add(n)),e=this._getBoundsOffset(n,e,i);return Math.abs(e.x)<=1&&Math.abs(e.y)<=1?t:this.unproject(s.add(e),i)},_limitOffset:function(t,i){if(!i)return t;var e=this.getPixelBounds(),e=new Z(e.min.add(t),e.max.add(t));return t.add(this._getBoundsOffset(e,i))},_getBoundsOffset:function(t,i,e){i=B(this.project(i.getNorthEast(),e),this.project(i.getSouthWest(),e)),e=i.min.subtract(t.min),t=i.max.subtract(t.max);return new A(this._rebound(e.x,-t.x),this._rebound(e.y,-t.y))},_rebound:function(t,i){return 0<t+i?Math.round(t-i)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(i))},_limitZoom:function(t){var i=this.getMinZoom(),e=this.getMaxZoom(),s=Et.any3d?this.options.zoomSnap:1;return s&&(t=Math.round(t/s)*s),Math.max(i,Math.min(e,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){li(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,i){t=this._getCenterOffset(t)._trunc();return!(!0!==(i&&i.animate)&&!this.getSize().contains(t))&&(this.panBy(t,i),!0)},_createAnimProxy:function(){var t=this._proxy=ei("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var i=Qt,e=this._proxy.style[i];pi(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),e===this._proxy.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){si(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),i=this.getZoom();pi(this._proxy,this.project(t,i),this.getZoomScale(i,1))},_catchTransitionEnd:function(t){this._animatingZoom&&0<=t.propertyName.indexOf("transform")&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,i,e){if(this._animatingZoom)return!0;if(e=e||{},!this._zoomAnimated||!1===e.animate||this._nothingToAnimate()||Math.abs(i-this._zoom)>this.options.zoomAnimationThreshold)return!1;var s=this.getZoomScale(i),s=this._getCenterOffset(t)._divideBy(1-1/s);return!(!0!==e.animate&&!this.getSize().contains(s))&&(C(function(){this._moveStart(!0,e.noMoveStart||!1)._animateZoom(t,i,!0)},this),!0)},_animateZoom:function(t,i,e,s){this._mapPane&&(e&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=i,hi(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:i,noUpdate:s}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(r(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&li(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Gi(t){return new Fi(t)}var Fi=E.extend({options:{position:"topright"},initialize:function(t){_(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var i=this._map;return i&&i.removeControl(this),this.options.position=t,i&&i.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var i=this._container=this.onAdd(t),e=this.getPosition(),t=t._controlCorners[e];return hi(i,"leaflet-control"),-1!==e.indexOf("bottom")?t.insertBefore(i,t.firstChild):t.appendChild(i),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(si(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(t){this._map&&t&&0<t.screenX&&0<t.screenY&&this._map.getContainer().focus()}});qi.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var e=this._controlCorners={},s="leaflet-",n=this._controlContainer=ei("div",s+"control-container",this._container);function t(t,i){e[t+i]=ei("div",s+t+" "+s+i,n)}t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)si(this._controlCorners[t]);si(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Hi=Fi.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,i,e,s){return e<s?-1:s<e?1:0}},initialize:function(t,i,e){for(var s in _(this,e),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1,t)this._addLayer(t[s],s);for(s in i)this._addLayer(i[s],s,!0)},onAdd:function(t){this._initLayout(),this._update(),(this._map=t).on("zoomend",this._checkDisabledLayers,this);for(var i=0;i<this._layers.length;i++)this._layers[i].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return Fi.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,i){return this._addLayer(t,i),this._map?this._update():this},addOverlay:function(t,i){return this._addLayer(t,i,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);t=this._getLayer(h(t));return t&&this._layers.splice(this._layers.indexOf(t),1),this._map?this._update():this},expand:function(){hi(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(hi(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):li(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return li(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",i=this._container=ei("div",t),e=this.options.collapsed;i.setAttribute("aria-haspopup",!0),Ai(i),zi(i);var s=this._section=ei("section",t+"-list");e&&(this._map.on("click",this.collapse,this),bi(i,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var n=this._layersLink=ei("a",t+"-toggle",i);n.href="#",n.title="Layers",n.setAttribute("role","button"),bi(n,{keydown:function(t){13===t.keyCode&&this._expandSafely()},click:function(t){Oi(t),this._expandSafely()}},this),e||this.expand(),this._baseLayersList=ei("div",t+"-base",s),this._separator=ei("div",t+"-separator",s),this._overlaysList=ei("div",t+"-overlays",s),i.appendChild(s)},_getLayer:function(t){for(var i=0;i<this._layers.length;i++)if(this._layers[i]&&h(this._layers[i].layer)===t)return this._layers[i]},_addLayer:function(t,i,e){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:i,overlay:e}),this.options.sortLayers&&this._layers.sort(r(function(t,i){return this.options.sortFunction(t.layer,i.layer,t.name,i.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;ni(this._baseLayersList),ni(this._overlaysList),this._layerControlInputs=[];for(var t,i,e,s=0,n=0;n<this._layers.length;n++)e=this._layers[n],this._addItem(e),i=i||e.overlay,t=t||!e.overlay,s+=e.overlay?0:1;return this.options.hideSingleBase&&(this._baseLayersList.style.display=(t=t&&1<s)?"":"none"),this._separator.style.display=i&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var i=this._getLayer(h(t.target)),t=i.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;t&&this._map.fire(t,i)},_createRadioElement:function(t,i){t='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(i?' checked="checked"':"")+"/>",i=document.createElement("div");return i.innerHTML=t,i.firstChild},_addItem:function(t){var i,e=document.createElement("label"),s=this._map.hasLayer(t.layer);t.overlay?((i=document.createElement("input")).type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=s):i=this._createRadioElement("leaflet-base-layers_"+h(this),s),this._layerControlInputs.push(i),i.layerId=h(t.layer),bi(i,"click",this._onInputClick,this);var n=document.createElement("span");n.innerHTML=" "+t.name;s=document.createElement("span");return e.appendChild(s),s.appendChild(i),s.appendChild(n),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){if(!this._preventClick){var t,i,e=this._layerControlInputs,s=[],n=[];this._handlingClick=!0;for(var o=e.length-1;0<=o;o--)t=e[o],i=this._getLayer(t.layerId).layer,t.checked?s.push(i):t.checked||n.push(i);for(o=0;o<n.length;o++)this._map.hasLayer(n[o])&&this._map.removeLayer(n[o]);for(o=0;o<s.length;o++)this._map.hasLayer(s[o])||this._map.addLayer(s[o]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var t,i,e=this._layerControlInputs,s=this._map.getZoom(),n=e.length-1;0<=n;n--)t=e[n],i=this._getLayer(t.layerId).layer,t.disabled=void 0!==i.options.minZoom&&s<i.options.minZoom||void 0!==i.options.maxZoom&&s>i.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,bi(t,"click",Oi),this.expand();var i=this;setTimeout(function(){Li(t,"click",Oi),i._preventClick=!1})}}),Ui=Fi.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var i="leaflet-control-zoom",e=ei("div",i+" leaflet-bar"),s=this.options;return this._zoomInButton=this._createButton(s.zoomInText,s.zoomInTitle,i+"-in",e,this._zoomIn),this._zoomOutButton=this._createButton(s.zoomOutText,s.zoomOutTitle,i+"-out",e,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),e},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,i,e,s,n){s=ei("a",e,s);return s.innerHTML=t,s.href="#",s.title=i,s.setAttribute("role","button"),s.setAttribute("aria-label",i),Ai(s),bi(s,"click",Ii),bi(s,"click",n,this),bi(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,i="leaflet-disabled";li(this._zoomInButton,i),li(this._zoomOutButton,i),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),!this._disabled&&t._zoom!==t.getMinZoom()||(hi(this._zoomOutButton,i),this._zoomOutButton.setAttribute("aria-disabled","true")),!this._disabled&&t._zoom!==t.getMaxZoom()||(hi(this._zoomInButton,i),this._zoomInButton.setAttribute("aria-disabled","true"))}});qi.mergeOptions({zoomControl:!0}),qi.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Ui,this.addControl(this.zoomControl))});var Wi=Fi.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var i="leaflet-control-scale",e=ei("div",i),s=this.options;return this._addScales(s,i+"-line",e),t.on(s.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),e},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,i,e){t.metric&&(this._mScale=ei("div",i,e)),t.imperial&&(this._iScale=ei("div",i,e))},_update:function(){var t=this._map,i=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,i]),t.containerPointToLatLng([this.options.maxWidth,i]));this._updateScales(i)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var i=this._getRoundNum(t);this._updateScale(this._mScale,i<1e3?i+" m":i/1e3+" km",i/t)},_updateImperial:function(t){var i,e=3.2808399*t;5280<e?(t=this._getRoundNum(i=e/5280),this._updateScale(this._iScale,t+" mi",t/i)):(i=this._getRoundNum(e),this._updateScale(this._iScale,i+" ft",i/e))},_updateScale:function(t,i,e){t.style.width=Math.round(this.options.maxWidth*e)+"px",t.innerHTML=i},_getRoundNum:function(t){var i=Math.pow(10,(Math.floor(t)+"").length-1),t=t/i;return i*(t=10<=t?10:5<=t?5:3<=t?3:2<=t?2:1)}}),Vi=Fi.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Et.inlineSvg?'<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg> ':"")+"Leaflet</a>"},initialize:function(t){_(this,t),this._attributions={}},onAdd:function(t){for(var i in(t.attributionControl=this)._container=ei("div","leaflet-control-attribution"),Ai(this._container),t._layers)t._layers[i].getAttribution&&this.addAttribution(t._layers[i].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t&&(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update()),this},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t,i=[];for(t in this._attributions)this._attributions[t]&&i.push(t);var e=[];this.options.prefix&&e.push(this.options.prefix),i.length&&e.push(i.join(", ")),this._container.innerHTML=e.join(' <span aria-hidden="true">|</span> ')}}});qi.mergeOptions({attributionControl:!0}),qi.addInitHook(function(){this.options.attributionControl&&(new Vi).addTo(this)});Fi.Layers=Hi,Fi.Zoom=Ui,Fi.Scale=Wi,Fi.Attribution=Vi,Gi.layers=function(t,i,e){return new Hi(t,i,e)},Gi.zoom=function(t){return new Ui(t)},Gi.scale=function(t){return new Wi(t)},Gi.attribution=function(t){return new Vi(t)};xt=E.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled&&(this._enabled=!1,this.removeHooks()),this},enabled:function(){return!!this._enabled}});xt.addTo=function(t,i){return t.addHandler(i,this),this};var bt={Events:k},Ki=Et.touch?"touchstart mousedown":"mousedown",Xi=z.extend({options:{clickTolerance:3},initialize:function(t,i,e,s){_(this,s),this._element=t,this._dragStartTarget=i||t,this._preventOutline=e},enable:function(){this._enabled||(bi(this._dragStartTarget,Ki,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Xi._dragging===this&&this.finishDrag(!0),Li(this._dragStartTarget,Ki,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){var i,e;this._enabled&&(this._moved=!1,ri(this._element,"leaflet-zoom-anim")||(t.touches&&1!==t.touches.length?Xi._dragging===this&&this.finishDrag():Xi._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||((Xi._dragging=this)._preventOutline&&yi(this._element),gi(),Vt(),this._moving||(this.fire("down"),i=t.touches?t.touches[0]:t,e=xi(this._element),this._startPoint=new A(i.clientX,i.clientY),this._startPos=fi(this._element),this._parentScale=wi(e),t="mousedown"===t.type,bi(document,t?"mousemove":"touchmove",this._onMove,this),bi(document,t?"mouseup":"touchend touchcancel",this._onUp,this)))))},_onMove:function(t){var i;this._enabled&&(t.touches&&1<t.touches.length?this._moved=!0:((i=new A((i=t.touches&&1===t.touches.length?t.touches[0]:t).clientX,i.clientY)._subtract(this._startPoint)).x||i.y)&&(Math.abs(i.x)+Math.abs(i.y)<this.options.clickTolerance||(i.x/=this._parentScale.x,i.y/=this._parentScale.y,Oi(t),this._moved||(this.fire("dragstart"),this._moved=!0,hi(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),hi(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(i),this._moving=!0,this._lastEvent=t,this._updatePosition())))},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),mi(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){li(document.body,"leaflet-dragging"),this._lastTarget&&(li(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Li(document,"mousemove touchmove",this._onMove,this),Li(document,"mouseup touchend touchcancel",this._onUp,this),vi(),Kt();var i=this._moved&&this._moving;this._moving=!1,Xi._dragging=!1,i&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}});function Ji(t,i,e){for(var s,n,o,a,r,h,l,c=[1,4,2,8],u=0,d=t.length;u<d;u++)t[u]._code=ne(t[u],i);for(o=0;o<4;o++){for(h=c[o],s=[],u=0,n=(d=t.length)-1;u<d;n=u++)a=t[u],r=t[n],a._code&h?r._code&h||((l=se(r,a,h,i,e))._code=ne(l,i),s.push(l)):(r._code&h&&((l=se(r,a,h,i,e))._code=ne(l,i),s.push(l)),s.push(a));t=s}return t}function Qi(t,i){var e,s,n,o,a,r,h;if(!t||0===t.length)throw new Error("latlngs not passed");ae(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var l=D([0,0]),c=R(t);c.getNorthWest().distanceTo(c.getSouthWest())*c.getNorthEast().distanceTo(c.getNorthWest())<1700&&(l=Yi(t));for(var u=t.length,d=[],_=0;_<u;_++){var p=D(t[_]);d.push(i.project(D([p.lat-l.lat,p.lng-l.lng])))}for(_=a=r=h=0,e=u-1;_<u;e=_++)s=d[_],n=d[e],o=s.y*n.x-n.y*s.x,r+=(s.x+n.x)*o,h+=(s.y+n.y)*o,a+=3*o;c=0===a?d[0]:[r/a,h/a],c=i.unproject(I(c));return D([c.lat+l.lat,c.lng+l.lng])}function Yi(t){for(var i=0,e=0,s=0,n=0;n<t.length;n++){var o=D(t[n]);i+=o.lat,e+=o.lng,s++}return D([i/s,e/s])}var $i,wt={__proto__:null,clipPolygon:Ji,polygonCenter:Qi,centroid:Yi};function te(t,i){if(!i||!t.length)return t.slice();i*=i;return t=function(t,i){var e=t.length,s=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(e);s[0]=s[e-1]=1,function t(i,e,s,n,o){var a,r,h,l=0;for(r=n+1;r<=o-1;r++)h=oe(i[r],i[n],i[o],!0),l<h&&(a=r,l=h);s<l&&(e[a]=1,t(i,e,s,n,a),t(i,e,s,a,o))}(t,s,i,0,e-1);var n,o=[];for(n=0;n<e;n++)s[n]&&o.push(t[n]);return o}(t=function(t,i){for(var e=[t[0]],s=1,n=0,o=t.length;s<o;s++)(function(t,i){var e=i.x-t.x,t=i.y-t.y;return e*e+t*t})(t[s],t[n])>i&&(e.push(t[s]),n=s);n<o-1&&e.push(t[o-1]);return e}(t,i),i)}function ie(t,i,e){return Math.sqrt(oe(t,i,e,!0))}function ee(t,i,e,s,n){var o,a,r,h=s?$i:ne(t,e),l=ne(i,e);for($i=l;;){if(!(h|l))return[t,i];if(h&l)return!1;r=ne(a=se(t,i,o=h||l,e,n),e),o===h?(t=a,h=r):(i=a,l=r)}}function se(t,i,e,s,n){var o,a,r=i.x-t.x,h=i.y-t.y,i=s.min,s=s.max;return 8&e?(o=t.x+r*(s.y-t.y)/h,a=s.y):4&e?(o=t.x+r*(i.y-t.y)/h,a=i.y):2&e?(o=s.x,a=t.y+h*(s.x-t.x)/r):1&e&&(o=i.x,a=t.y+h*(i.x-t.x)/r),new A(o,a,n)}function ne(t,i){var e=0;return t.x<i.min.x?e|=1:t.x>i.max.x&&(e|=2),t.y<i.min.y?e|=4:t.y>i.max.y&&(e|=8),e}function oe(t,i,e,s){var n=i.x,o=i.y,a=e.x-n,r=e.y-o,i=a*a+r*r;return 0<i&&(1<(i=((t.x-n)*a+(t.y-o)*r)/i)?(n=e.x,o=e.y):0<i&&(n+=a*i,o+=r*i)),a=t.x-n,r=t.y-o,s?a*a+r*r:new A(n,o)}function ae(t){return!g(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function re(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),ae(t)}function he(t,i){var e,s,n,o,a,r;if(!t||0===t.length)throw new Error("latlngs not passed");ae(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var h=D([0,0]),l=R(t);l.getNorthWest().distanceTo(l.getSouthWest())*l.getNorthEast().distanceTo(l.getNorthWest())<1700&&(h=Yi(t));for(var c=t.length,u=[],d=0;d<c;d++){var _=D(t[d]);u.push(i.project(D([_.lat-h.lat,_.lng-h.lng])))}for(e=d=0;d<c-1;d++)e+=u[d].distanceTo(u[d+1])/2;if(0===e)r=u[0];else for(s=d=0;d<c-1;d++)if(n=u[d],o=u[d+1],e<(s+=a=n.distanceTo(o))){r=[o.x-(a=(s-e)/a)*(o.x-n.x),o.y-a*(o.y-n.y)];break}l=i.unproject(I(r));return D([l.lat+h.lat,l.lng+h.lng])}var Pt={__proto__:null,simplify:te,pointToSegmentDistance:ie,closestPointOnSegment:function(t,i,e){return oe(t,i,e)},clipSegment:ee,_getEdgeIntersection:se,_getBitCode:ne,_sqClosestPointOnSegment:oe,isFlat:ae,_flat:re,polylineCenter:he},F={project:function(t){return new A(t.lng,t.lat)},unproject:function(t){return new j(t.y,t.x)},bounds:new Z([-180,-90],[180,90])},Lt={R:6378137,R_MINOR:6356752.314245179,bounds:new Z([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var i=Math.PI/180,e=this.R,s=t.lat*i,n=this.R_MINOR/e,o=Math.sqrt(1-n*n),n=o*Math.sin(s),o=Math.tan(Math.PI/4-s/2)/Math.pow((1-n)/(1+n),o/2),s=-e*Math.log(Math.max(o,1e-10));return new A(t.lng*i*e,s)},unproject:function(t){for(var i,e=180/Math.PI,s=this.R,n=this.R_MINOR/s,o=Math.sqrt(1-n*n),a=Math.exp(-t.y/s),r=Math.PI/2-2*Math.atan(a),h=0,l=.1;h<15&&1e-7<Math.abs(l);h++)i=o*Math.sin(r),i=Math.pow((1-i)/(1+i),o/2),r+=l=Math.PI/2-2*Math.atan(a*i)-r;return new j(r*e,t.x*e/s)}},Ct={__proto__:null,LonLat:F,Mercator:Lt,SphericalMercator:H},Q=l({},G,{code:"EPSG:3395",projection:Lt,transformation:W(nt=.5/(Math.PI*Lt.R),.5,-nt,.5)}),le=l({},G,{code:"EPSG:4326",projection:F,transformation:W(1/180,1,-1/180,.5)}),Tt=l({},q,{projection:F,transformation:W(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,i){var e=i.lng-t.lng,t=i.lat-t.lat;return Math.sqrt(e*e+t*t)},infinite:!0});q.Earth=G,q.EPSG3395=Q,q.EPSG3857=V,q.EPSG900913=K,q.EPSG4326=le,q.Simple=Tt;k=z.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[h(t)]=this},removeInteractiveTarget:function(t){return delete this._map._targets[h(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var i,e=t.target;e.hasLayer(this)&&(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents&&(i=this.getEvents(),e.on(i,this),this.once("remove",function(){e.off(i,this)},this)),this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this}))}});qi.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var i=h(t);return this._layers[i]||((this._layers[i]=t)._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var i=h(t);return this._layers[i]&&(this._loaded&&t.onRemove(this),delete this._layers[i],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null),this},hasLayer:function(t){return h(t)in this._layers},eachLayer:function(t,i){for(var e in this._layers)t.call(i,this._layers[e]);return this},_addLayers:function(t){for(var i=0,e=(t=t?g(t)?t:[t]:[]).length;i<e;i++)this.addLayer(t[i])},_addZoomLimit:function(t){isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[h(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){t=h(t);this._zoomBoundLayers[t]&&(delete this._zoomBoundLayers[t],this._updateZoomLevels())},_updateZoomLevels:function(){var t,i=1/0,e=-1/0,s=this._getZoomSpan();for(t in this._zoomBoundLayers)var n=this._zoomBoundLayers[t].options,i=void 0===n.minZoom?i:Math.min(i,n.minZoom),e=void 0===n.maxZoom?e:Math.max(e,n.maxZoom);this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=i===1/0?void 0:i,s!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var ce=k.extend({initialize:function(t,i){var e,s;if(_(this,i),this._layers={},t)for(e=0,s=t.length;e<s;e++)this.addLayer(t[e])},addLayer:function(t){var i=this.getLayerId(t);return this._layers[i]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){t=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[t]&&this._map.removeLayer(this._layers[t]),delete this._layers[t],this},hasLayer:function(t){return("number"==typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var i,e,s=Array.prototype.slice.call(arguments,1);for(i in this._layers)(e=this._layers[i])[t]&&e[t].apply(e,s);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,i){for(var e in this._layers)t.call(i,this._layers[e]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:h}),ue=ce.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),ce.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?((t=t in this._layers?this._layers[t]:t).removeEventParent(this),ce.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t,i=new N;for(t in this._layers){var e=this._layers[t];i.extend(e.getBounds?e.getBounds():e.getLatLng())}return i}}),de=E.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){_(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,i){var e=this._getIconUrl(t);if(!e){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}i=this._createImg(e,i&&"IMG"===i.tagName?i:null);return this._setIconStyles(i,t),!this.options.crossOrigin&&""!==this.options.crossOrigin||(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),i},_setIconStyles:function(t,i){var e=this.options,s=e[i+"Size"],n=I(s="number"==typeof s?[s,s]:s),s=I("shadow"===i&&e.shadowAnchor||e.iconAnchor||n&&n.divideBy(2,!0));t.className="leaflet-marker-"+i+" "+(e.className||""),s&&(t.style.marginLeft=-s.x+"px",t.style.marginTop=-s.y+"px"),n&&(t.style.width=n.x+"px",t.style.height=n.y+"px")},_createImg:function(t,i){return(i=i||document.createElement("img")).src=t,i},_getIconUrl:function(t){return Et.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});var _e=de.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return"string"!=typeof _e.imagePath&&(_e.imagePath=this._detectIconPath()),(this.options.imagePath||_e.imagePath)+de.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){function i(t,i,e){return(t=i.exec(t))&&t[e]}return(t=i(t,/^url\((['"])?(.+)\1\)$/,2))&&i(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=ei("div","leaflet-default-icon-path",document.body),i=ii(t,"background-image")||ii(t,"backgroundImage");if(document.body.removeChild(t),i=this._stripUrl(i))return i;i=document.querySelector('link[href$="leaflet.css"]');return i?i.href.substring(0,i.href.length-"leaflet.css".length-1):""}}),pe=xt.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new Xi(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),hi(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&li(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var i=this._marker,e=i._map,s=this._marker.options.autoPanSpeed,n=this._marker.options.autoPanPadding,o=fi(i._icon),a=e.getPixelBounds(),r=e.getPixelOrigin(),n=B(a.min._subtract(r).add(n),a.max._subtract(r).subtract(n));n.contains(o)||(s=I((Math.max(n.max.x,o.x)-n.max.x)/(a.max.x-n.max.x)-(Math.min(n.min.x,o.x)-n.min.x)/(a.min.x-n.min.x),(Math.max(n.max.y,o.y)-n.max.y)/(a.max.y-n.max.y)-(Math.min(n.min.y,o.y)-n.min.y)/(a.min.y-n.min.y)).multiplyBy(s),e.panBy(s,{animate:!1}),this._draggable._newPos._add(s),this._draggable._startPos._add(s),mi(i._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=C(this._adjustPan.bind(this,t)))},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(T(this._panRequest),this._panRequest=C(this._adjustPan.bind(this,t)))},_onDrag:function(t){var i=this._marker,e=i._shadow,s=fi(i._icon),n=i._map.layerPointToLatLng(s);e&&mi(e,s),i._latlng=n,t.latlng=n,t.oldLatLng=this._oldLatLng,i.fire("move",t).fire("drag",t)},_onDragEnd:function(t){T(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),me=k.extend({options:{icon:new _e,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,i){_(this,i),this._latlng=D(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var i=this._latlng;return this._latlng=D(t),this.update(),this.fire("move",{oldLatLng:i,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){var t;return this._icon&&this._map&&(t=this._map.latLngToLayerPoint(this._latlng).round(),this._setPos(t)),this},_initIcon:function(){var t=this.options,i="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),e=t.icon.createIcon(this._icon),s=!1;e!==this._icon&&(this._icon&&this._removeIcon(),s=!0,t.title&&(e.title=t.title),"IMG"===e.tagName&&(e.alt=t.alt||"")),hi(e,i),t.keyboard&&(e.tabIndex="0",e.setAttribute("role","button")),this._icon=e,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&bi(e,"focus",this._panOnFocus,this);var n=t.icon.createShadow(this._shadow),e=!1;n!==this._shadow&&(this._removeShadow(),e=!0),n&&(hi(n,i),n.alt=""),this._shadow=n,t.opacity<1&&this._updateOpacity(),s&&this.getPane().appendChild(this._icon),this._initInteraction(),n&&e&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Li(this._icon,"focus",this._panOnFocus,this),si(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&si(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&mi(this._icon,t),this._shadow&&mi(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){t=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(t)},_initInteraction:function(){var t;this.options.interactive&&(hi(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),pe&&(t=this.options.draggable,this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new pe(this),t&&this.dragging.enable()))},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&di(this._icon,t),this._shadow&&di(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t,i,e=this._map;e&&(t=(i=this.options.icon.options).iconSize?I(i.iconSize):I(0,0),i=i.iconAnchor?I(i.iconAnchor):I(0,0),e.panInside(this._latlng,{paddingTopLeft:i,paddingBottomRight:t.subtract(i)}))},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});var fe=k.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return _(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),ge=fe.extend({options:{fill:!0,radius:10},initialize:function(t,i){_(this,i),this._latlng=D(t),this._radius=this.options.radius},setLatLng:function(t){var i=this._latlng;return this._latlng=D(t),this.redraw(),this.fire("move",{oldLatLng:i,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var i=t&&t.radius||this._radius;return fe.prototype.setStyle.call(this,t),this.setRadius(i),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,i=this._radiusY||t,e=this._clickTolerance(),e=[t+e,i+e];this._pxBounds=new Z(this._point.subtract(e),this._point.add(e))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}});var ve=ge.extend({initialize:function(t,i,e){if(_(this,i="number"==typeof i?l({},e,{radius:i}):i),this._latlng=D(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new N(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:fe.prototype.setStyle,_project:function(){var t,i,e,s,n,o=this._latlng.lng,a=this._latlng.lat,r=this._map,h=r.options.crs;h.distance===G.distance?(n=Math.PI/180,t=this._mRadius/G.R/n,i=r.project([a+t,o]),s=r.project([a-t,o]),e=i.add(s).divideBy(2),s=r.unproject(e).lat,n=Math.acos((Math.cos(t*n)-Math.sin(a*n)*Math.sin(s*n))/(Math.cos(a*n)*Math.cos(s*n)))/n,!isNaN(n)&&0!==n||(n=t/Math.cos(Math.PI/180*a)),this._point=e.subtract(r.getPixelOrigin()),this._radius=isNaN(n)?0:e.x-r.project([s,o-n]).x,this._radiusY=e.y-i.y):(h=h.unproject(h.project(this._latlng).subtract([this._mRadius,0])),this._point=r.latLngToLayerPoint(this._latlng),this._radius=this._point.x-r.latLngToLayerPoint(h).x),this._updateBounds()}});var ye=fe.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,i){_(this,i),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var i=1/0,e=null,s=oe,n=0,o=this._parts.length;n<o;n++)for(var a=this._parts[n],r=1,h=a.length;r<h;r++){var l,c,u=s(t,l=a[r-1],c=a[r],!0);u<i&&(i=u,e=s(t,l,c))}return e&&(e.distance=Math.sqrt(i)),e},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return he(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,i){return i=i||this._defaultShape(),t=D(t),i.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new N,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return ae(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var i=[],e=ae(t),s=0,n=t.length;s<n;s++)e?(i[s]=D(t[s]),this._bounds.extend(i[s])):i[s]=this._convertLatLngs(t[s]);return i},_project:function(){var t=new Z;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),t=new A(t,t);this._rawPxBounds&&(this._pxBounds=new Z([this._rawPxBounds.min.subtract(t),this._rawPxBounds.max.add(t)]))},_projectLatlngs:function(t,i,e){var s,n,o=t[0]instanceof j,a=t.length;if(o){for(n=[],s=0;s<a;s++)n[s]=this._map.latLngToLayerPoint(t[s]),e.extend(n[s]);i.push(n)}else for(s=0;s<a;s++)this._projectLatlngs(t[s],i,e)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var i,e,s,n,o=this._parts,a=0,r=0,h=this._rings.length;a<h;a++)for(i=0,e=(n=this._rings[a]).length;i<e-1;i++)(s=ee(n[i],n[i+1],t,i,!0))&&(o[r]=o[r]||[],o[r].push(s[0]),s[1]===n[i+1]&&i!==e-2||(o[r].push(s[1]),r++))},_simplifyPoints:function(){for(var t=this._parts,i=this.options.smoothFactor,e=0,s=t.length;e<s;e++)t[e]=te(t[e],i)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,i){var e,s,n,o,a,r,h=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(e=0,o=this._parts.length;e<o;e++)for(s=0,n=(a=(r=this._parts[e]).length)-1;s<a;n=s++)if((i||0!==s)&&ie(t,r[n],r[s])<=h)return!0;return!1}});ye._flat=re;var Me=ye.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Qi(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var i=ye.prototype._convertLatLngs.call(this,t),t=i.length;return 2<=t&&i[0]instanceof j&&i[0].equals(i[t-1])&&i.pop(),i},_setLatLngs:function(t){ye.prototype._setLatLngs.call(this,t),ae(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return(ae(this._latlngs[0])?this._latlngs:this._latlngs[0])[0]},_clipPoints:function(){var t=this._renderer._bounds,i=this.options.weight,i=new A(i,i),t=new Z(t.min.subtract(i),t.max.add(i));if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var e,s=0,n=this._rings.length;s<n;s++)(e=Ji(this._rings[s],t,!0)).length&&this._parts.push(e)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var i,e,s,n,o,a,r,h,l=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(n=0,r=this._parts.length;n<r;n++)for(o=0,a=(h=(i=this._parts[n]).length)-1;o<h;a=o++)e=i[o],s=i[a],e.y>t.y!=s.y>t.y&&t.x<(s.x-e.x)*(t.y-e.y)/(s.y-e.y)+e.x&&(l=!l);return l||ye.prototype._containsPoint.call(this,t,!0)}});var xe=ue.extend({initialize:function(t,i){_(this,i),this._layers={},t&&this.addData(t)},addData:function(t){var i,e,s,n=g(t)?t:t.features;if(n){for(i=0,e=n.length;i<e;i++)((s=n[i]).geometries||s.geometry||s.features||s.coordinates)&&this.addData(s);return this}var o=this.options;if(o.filter&&!o.filter(t))return this;var a=we(t,o);return a?(a.feature=Ee(t),a.defaultOptions=a.options,this.resetStyle(a),o.onEachFeature&&o.onEachFeature(t,a),this.addLayer(a)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=l({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(i){return this.eachLayer(function(t){this._setLayerStyle(t,i)},this)},_setLayerStyle:function(t,i){t.setStyle&&("function"==typeof i&&(i=i(t.feature)),t.setStyle(i))}});function we(t,i){var e,s,n,o,a="Feature"===t.type?t.geometry:t,r=a?a.coordinates:null,h=[],l=i&&i.pointToLayer,c=i&&i.coordsToLatLng||Pe;if(!r&&!a)return null;switch(a.type){case"Point":return be(l,t,e=c(r),i);case"MultiPoint":for(n=0,o=r.length;n<o;n++)e=c(r[n]),h.push(be(l,t,e,i));return new ue(h);case"LineString":case"MultiLineString":return s=Le(r,"LineString"===a.type?0:1,c),new ye(s,i);case"Polygon":case"MultiPolygon":return s=Le(r,"Polygon"===a.type?1:2,c),new Me(s,i);case"GeometryCollection":for(n=0,o=a.geometries.length;n<o;n++){var u=we({geometry:a.geometries[n],type:"Feature",properties:t.properties},i);u&&h.push(u)}return new ue(h);case"FeatureCollection":for(n=0,o=a.features.length;n<o;n++){var d=we(a.features[n],i);d&&h.push(d)}return new ue(h);default:throw new Error("Invalid GeoJSON object.")}}function be(t,i,e,s){return t?t(i,e):new me(e,s&&s.markersInheritOptions&&s)}function Pe(t){return new j(t[1],t[0],t[2])}function Le(t,i,e){for(var s,n=[],o=0,a=t.length;o<a;o++)s=i?Le(t[o],i-1,e):(e||Pe)(t[o]),n.push(s);return n}function Ce(t,i){return void 0!==(t=D(t)).alt?[a(t.lng,i),a(t.lat,i),a(t.alt,i)]:[a(t.lng,i),a(t.lat,i)]}function Te(t,i,e,s){for(var n=[],o=0,a=t.length;o<a;o++)n.push(i?Te(t[o],ae(t[o])?0:i-1,e,s):Ce(t[o],s));return!i&&e&&0<n.length&&n.push(n[0].slice()),n}function Se(t,i){return t.feature?l({},t.feature,{geometry:i}):Ee(i)}function Ee(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}H={toGeoJSON:function(t){return Se(this,{type:"Point",coordinates:Ce(this.getLatLng(),t)})}};function ke(t,i){return new xe(t,i)}me.include(H),ve.include(H),ge.include(H),ye.include({toGeoJSON:function(t){var i=!ae(this._latlngs);return Se(this,{type:(i?"Multi":"")+"LineString",coordinates:Te(this._latlngs,i?1:0,!1,t)})}}),Me.include({toGeoJSON:function(t){var i=!ae(this._latlngs),e=i&&!ae(this._latlngs[0]),t=Te(this._latlngs,e?2:i?1:0,!0,t);return Se(this,{type:(e?"Multi":"")+"Polygon",coordinates:t=!i?[t]:t})}}),ce.include({toMultiPoint:function(i){var e=[];return this.eachLayer(function(t){e.push(t.toGeoJSON(i).geometry.coordinates)}),Se(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(i){var t=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===t)return this.toMultiPoint(i);var e="GeometryCollection"===t,s=[];return this.eachLayer(function(t){t.toGeoJSON&&(t=t.toGeoJSON(i),e?s.push(t.geometry):"FeatureCollection"===(t=Ee(t)).type?s.push.apply(s,t.features):s.push(t))}),e?Se(this,{geometries:s,type:"GeometryCollection"}):{type:"FeatureCollection",features:s}}});var Lt=ke,ze=k.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,i,e){this._url=t,this._bounds=R(i),_(this,e)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(hi(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){si(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&oi(this._image),this},bringToBack:function(){return this._map&&ai(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=R(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,i=this._image=t?this._url:ei("img");hi(i,"leaflet-image-layer"),this._zoomAnimated&&hi(i,"leaflet-zoom-animated"),this.options.className&&hi(i,this.options.className),i.onselectstart=c,i.onmousemove=c,i.onload=r(this.fire,this,"load"),i.onerror=r(this._overlayOnError,this,"error"),!this.options.crossOrigin&&""!==this.options.crossOrigin||(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=i.src:(i.src=this._url,i.alt=this.options.alt)},_animateZoom:function(t){var i=this._map.getZoomScale(t.zoom),t=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;pi(this._image,t,i)},_reset:function(){var t=this._image,i=new Z(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),e=i.getSize();mi(t,i.min),t.style.width=e.x+"px",t.style.height=e.y+"px"},_updateOpacity:function(){di(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),Ae=ze.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,i=this._image=t?this._url:ei("video");if(hi(i,"leaflet-image-layer"),this._zoomAnimated&&hi(i,"leaflet-zoom-animated"),this.options.className&&hi(i,this.options.className),i.onselectstart=c,i.onmousemove=c,i.onloadeddata=r(this.fire,this,"load"),t){for(var e=i.getElementsByTagName("source"),s=[],n=0;n<e.length;n++)s.push(e[n].src);this._url=0<e.length?s:[i.src]}else{g(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(i.style,"objectFit")&&(i.style.objectFit="fill"),i.autoplay=!!this.options.autoplay,i.loop=!!this.options.loop,i.muted=!!this.options.muted,i.playsInline=!!this.options.playsInline;for(var o=0;o<this._url.length;o++){var a=ei("source");a.src=this._url[o],i.appendChild(a)}}}});var Oe=ze.extend({_initImage:function(){var t=this._image=this._url;hi(t,"leaflet-image-layer"),this._zoomAnimated&&hi(t,"leaflet-zoom-animated"),this.options.className&&hi(t,this.options.className),t.onselectstart=c,t.onmousemove=c}});var Ie=k.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,i){t&&(t instanceof j||g(t))?(this._latlng=D(t),_(this,i)):(_(this,t),this._source=i),this.options.content&&(this._content=this.options.content)},openOn:function(t){return(t=arguments.length?t:this._source._map).hasLayer(this)||t.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&di(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&di(this._container,1),this.bringToFront(),this.options.interactive&&(hi(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(di(this._container,0),this._removeTimeout=setTimeout(r(si,void 0,this._container),200)):si(this._container),this.options.interactive&&(li(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=D(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&oi(this._container),this},bringToBack:function(){return this._map&&ai(this._container),this},_prepareOpen:function(t){if(!(e=this._source)._map)return!1;if(e instanceof ue){var i,e=null,s=this._source._layers;for(i in s)if(s[i]._map){e=s[i];break}if(!e)return!1;this._source=e}if(!t)if(e.getCenter)t=e.getCenter();else if(e.getLatLng)t=e.getLatLng();else{if(!e.getBounds)throw new Error("Unable to get source layer LatLng.");t=e.getBounds().getCenter()}return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,i="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof i)t.innerHTML=i;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(i)}this.fire("contentupdate")}},_updatePosition:function(){var t,i,e;this._map&&(t=this._map.latLngToLayerPoint(this._latlng),e=I(this.options.offset),i=this._getAnchor(),this._zoomAnimated?mi(this._container,t.add(i)):e=e.add(t).add(i),i=this._containerBottom=-e.y,e=this._containerLeft=-Math.round(this._containerWidth/2)+e.x,this._container.style.bottom=i+"px",this._container.style.left=e+"px")},_getAnchor:function(){return[0,0]}});qi.include({_initOverlay:function(t,i,e,s){var n=i;return n instanceof t||(n=new t(s).setContent(i)),e&&n.setLatLng(e),n}}),k.include({_initOverlay:function(t,i,e,s){var n=e;return n instanceof t?(_(n,s),n._source=this):(n=i&&!s?i:new t(s,this)).setContent(e),n}});var Ze=Ie.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return!(t=arguments.length?t:this._source._map).hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,Ie.prototype.openOn.call(this,t)},onAdd:function(t){Ie.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof fe||this._source.on("preclick",ki))},onRemove:function(t){Ie.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof fe||this._source.off("preclick",ki))},getEvents:function(){var t=Ie.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_initLayout:function(){var t="leaflet-popup",i=this._container=ei("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),e=this._wrapper=ei("div",t+"-content-wrapper",i);this._contentNode=ei("div",t+"-content",e),Ai(i),zi(this._contentNode),bi(i,"contextmenu",ki),this._tipContainer=ei("div",t+"-tip-container",i),this._tip=ei("div",t+"-tip",this._tipContainer),this.options.closeButton&&((i=this._closeButton=ei("a",t+"-close-button",i)).setAttribute("role","button"),i.setAttribute("aria-label","Close popup"),i.href="#close",i.innerHTML='<span aria-hidden="true">&#215;</span>',bi(i,"click",function(t){Oi(t),this.close()},this))},_updateLayout:function(){var t=this._contentNode,i=t.style;i.width="",i.whiteSpace="nowrap";var e=t.offsetWidth,e=Math.min(e,this.options.maxWidth);e=Math.max(e,this.options.minWidth),i.width=e+1+"px",i.whiteSpace="",i.height="";var s=t.offsetHeight,n=this.options.maxHeight,e="leaflet-popup-scrolled";n&&n<s?(i.height=n+"px",hi(t,e)):li(t,e),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),t=this._getAnchor();mi(this._container,i.add(t))},_adjustPan:function(){var t,i,e,s,n,o,a,r;this.options.autoPan&&(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning?this._autopanning=!1:(t=this._map,n=parseInt(ii(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+n,r=this._containerWidth,(o=new A(this._containerLeft,-i-this._containerBottom))._add(fi(this._container)),e=t.layerPointToContainerPoint(o),a=I(this.options.autoPanPadding),s=I(this.options.autoPanPaddingTopLeft||a),n=I(this.options.autoPanPaddingBottomRight||a),o=t.getSize(),a=0,e.x+r+n.x>o.x&&(a=e.x+r-o.x+n.x),e.x-a-s.x<(r=0)&&(a=e.x-s.x),e.y+i+n.y>o.y&&(r=e.y+i-o.y+n.y),e.y-r-s.y<0&&(r=e.y-s.y),(a||r)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([a,r]))))},_getAnchor:function(){return I(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});qi.mergeOptions({closePopupOnClick:!0}),qi.include({openPopup:function(t,i,e){return this._initOverlay(Ze,t,i,e).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),k.include({bindPopup:function(t,i){return this._popup=this._initOverlay(Ze,this._popup,t,i),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof ue||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var i;this._popup&&this._map&&(Ii(t),i=t.layer||t.target,this._popup._source!==i||i instanceof fe?(this._popup._source=i,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var Be=Ie.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Ie.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Ie.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Ie.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ei("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+h(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var i,e=this._map,s=this._container,n=e.latLngToContainerPoint(e.getCenter()),o=e.layerPointToContainerPoint(t),a=this.options.direction,r=s.offsetWidth,h=s.offsetHeight,l=I(this.options.offset),e=this._getAnchor(),h="top"===a?(i=r/2,h):"bottom"===a?(i=r/2,0):(i="center"===a?r/2:"right"===a?0:"left"===a?r:o.x<n.x?(a="right",0):(a="left",r+2*(l.x+e.x)),h/2);t=t.subtract(I(i,h,!0)).add(l).add(e),li(s,"leaflet-tooltip-right"),li(s,"leaflet-tooltip-left"),li(s,"leaflet-tooltip-top"),li(s,"leaflet-tooltip-bottom"),hi(s,"leaflet-tooltip-"+a),mi(s,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&di(this._container,t)},_animateZoom:function(t){t=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(t)},_getAnchor:function(){return I(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});qi.include({openTooltip:function(t,i,e){return this._initOverlay(Be,t,i,e).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),k.include({bindTooltip:function(t,i){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Be,this._tooltip,t,i),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){var i,e;!t&&this._tooltipHandlersAdded||(i=t?"off":"on",e={remove:this.closeTooltip,move:this._moveTooltip},this._tooltip.options.permanent?e.add=this._openTooltip:(e.mouseover=this._openTooltip,e.mouseout=this.closeTooltip,e.click=this._openTooltip,this._map?this._addFocusListeners():e.add=this._addFocusListeners),this._tooltip.options.sticky&&(e.mousemove=this._moveTooltip),this[i](e),this._tooltipHandlersAdded=!t)},openTooltip:function(t){return this._tooltip&&(this instanceof ue||(this._tooltip._source=this),this._tooltip._prepareOpen(t)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(t){var i="function"==typeof t.getElement&&t.getElement();i&&(bi(i,"focus",function(){this._tooltip._source=t,this.openTooltip()},this),bi(i,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(t){t="function"==typeof t.getElement&&t.getElement();t&&t.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(t){var i;this._tooltip&&this._map&&(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag?(this._openOnceFlag=!0,(i=this)._map.once("moveend",function(){i._openOnceFlag=!1,i._openTooltip(t)})):(this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0)))},_moveTooltip:function(t){var i=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(t=this._map.mouseEventToContainerPoint(t.originalEvent),t=this._map.containerPointToLayerPoint(t),i=this._map.layerPointToLatLng(t)),this._tooltip.setLatLng(i)}});var Ne=de.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var i=t&&"DIV"===t.tagName?t:document.createElement("div"),t=this.options;return t.html instanceof Element?(ni(i),i.appendChild(t.html)):i.innerHTML=!1!==t.html?t.html:"",t.bgPos&&(t=I(t.bgPos),i.style.backgroundPosition=-t.x+"px "+-t.y+"px"),this._setIconStyles(i,"icon"),i},createShadow:function(){return null}});de.Default=_e;var Re=k.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Et.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){_(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),si(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(oi(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(ai(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){var t;return this._map&&(this._removeAllTiles(),(t=this._clampZoom(this._map.getZoom()))!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()),this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=s(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof A?t:new A(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var i,e=this.getPane().children,s=-t(-1/0,1/0),n=0,o=e.length;n<o;n++)i=e[n].style.zIndex,e[n]!==this._container&&i&&(s=t(s,+i));isFinite(s)&&(this.options.zIndex=s+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Et.ielt9){di(this._container,this.options.opacity);var t,i=+new Date,e=!1,s=!1;for(t in this._tiles){var n,o=this._tiles[t];o.current&&o.loaded&&(n=Math.min(1,(i-o.loaded)/200),di(o.el,n),n<1?e=!0:(o.active?s=!0:this._onOpaqueTile(o),o.active=!0))}s&&!this._noPrune&&this._pruneTiles(),e&&(T(this._fadeFrame),this._fadeFrame=C(this._updateOpacity,this))}},_onOpaqueTile:c,_initContainer:function(){this._container||(this._container=ei("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,i=this.options.maxZoom;if(void 0!==t){for(var e in this._levels)e=Number(e),this._levels[e].el.children.length||e===t?(this._levels[e].el.style.zIndex=i-Math.abs(t-e),this._onUpdateLevel(e)):(si(this._levels[e].el),this._removeTilesAtZoom(e),this._onRemoveLevel(e),delete this._levels[e]);var s=this._levels[t],n=this._map;return s||((s=this._levels[t]={}).el=ei("div","leaflet-tile-container leaflet-zoom-animated",this._container),s.el.style.zIndex=i,s.origin=n.project(n.unproject(n.getPixelOrigin()),t).round(),s.zoom=t,this._setZoomTransform(s,n.getCenter(),n.getZoom()),c(s.el.offsetWidth),this._onCreateLevel(s)),this._level=s}},_onUpdateLevel:c,_onRemoveLevel:c,_onCreateLevel:c,_pruneTiles:function(){if(this._map){var t,i,e,s=this._map.getZoom();if(s>this.options.maxZoom||s<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)(e=this._tiles[t]).current&&!e.active&&(i=e.coords,this._retainParent(i.x,i.y,i.z,i.z-5)||this._retainChildren(i.x,i.y,i.z,i.z+2));for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var i in this._tiles)this._tiles[i].coords.z===t&&this._removeTile(i)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)si(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,i,e,s){var n=Math.floor(t/2),t=Math.floor(i/2),i=e-1,e=new A(+n,+t);e.z=+i;e=this._tileCoordsToKey(e),e=this._tiles[e];return e&&e.active?e.retain=!0:(e&&e.loaded&&(e.retain=!0),s<i&&this._retainParent(n,t,i,s))},_retainChildren:function(t,i,e,s){for(var n=2*t;n<2*t+2;n++)for(var o=2*i;o<2*i+2;o++){var a=new A(n,o);a.z=e+1;a=this._tileCoordsToKey(a),a=this._tiles[a];a&&a.active?a.retain=!0:(a&&a.loaded&&(a.retain=!0),e+1<s&&this._retainChildren(n,o,e+1,s))}},_resetView:function(t){t=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),t,t)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var i=this.options;return void 0!==i.minNativeZoom&&t<i.minNativeZoom?i.minNativeZoom:void 0!==i.maxNativeZoom&&i.maxNativeZoom<t?i.maxNativeZoom:t},_setView:function(t,i,e,s){var n=Math.round(i),n=void 0!==this.options.maxZoom&&n>this.options.maxZoom||void 0!==this.options.minZoom&&n<this.options.minZoom?void 0:this._clampZoom(n),o=this.options.updateWhenZooming&&n!==this._tileZoom;s&&!o||(this._tileZoom=n,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==n&&this._update(t),e||this._pruneTiles(),this._noPrune=!!e),this._setZoomTransforms(t,i)},_setZoomTransforms:function(t,i){for(var e in this._levels)this._setZoomTransform(this._levels[e],t,i)},_setZoomTransform:function(t,i,e){var s=this._map.getZoomScale(e,t.zoom),e=t.origin.multiplyBy(s).subtract(this._map._getNewPixelOrigin(i,e)).round();Et.any3d?pi(t.el,e,s):mi(t.el,e)},_resetGrid:function(){var t=this._map,i=t.options.crs,e=this._tileSize=this.getTileSize(),s=this._tileZoom,n=this._map.getPixelWorldBounds(this._tileZoom);n&&(this._globalTileRange=this._pxBoundsToTileRange(n)),this._wrapX=i.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,i.wrapLng[0]],s).x/e.x),Math.ceil(t.project([0,i.wrapLng[1]],s).x/e.y)],this._wrapY=i.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([i.wrapLat[0],0],s).y/e.x),Math.ceil(t.project([i.wrapLat[1],0],s).y/e.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var i=this._map,e=i._animatingZoom?Math.max(i._animateToZoom,i.getZoom()):i.getZoom(),e=i.getZoomScale(e,this._tileZoom),t=i.project(t,this._tileZoom).floor(),e=i.getSize().divideBy(2*e);return new Z(t.subtract(e),t.add(e))},_update:function(t){var i=this._map;if(i){var e=this._clampZoom(i.getZoom());if(void 0===t&&(t=i.getCenter()),void 0!==this._tileZoom){var s,i=this._getTiledPixelBounds(t),n=this._pxBoundsToTileRange(i),o=n.getCenter(),a=[],i=this.options.keepBuffer,r=new Z(n.getBottomLeft().subtract([i,-i]),n.getTopRight().add([i,-i]));if(!(isFinite(n.min.x)&&isFinite(n.min.y)&&isFinite(n.max.x)&&isFinite(n.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(s in this._tiles){var h=this._tiles[s].coords;h.z===this._tileZoom&&r.contains(new A(h.x,h.y))||(this._tiles[s].current=!1)}if(1<Math.abs(e-this._tileZoom))this._setView(t,e);else{for(var l=n.min.y;l<=n.max.y;l++)for(var c=n.min.x;c<=n.max.x;c++){var u,d=new A(c,l);d.z=this._tileZoom,this._isValidTile(d)&&((u=this._tiles[this._tileCoordsToKey(d)])?u.current=!0:a.push(d))}if(a.sort(function(t,i){return t.distanceTo(o)-i.distanceTo(o)}),0!==a.length){this._loading||(this._loading=!0,this.fire("loading"));for(var _=document.createDocumentFragment(),c=0;c<a.length;c++)this._addTile(a[c],_);this._level.el.appendChild(_)}}}}},_isValidTile:function(t){var i=this._map.options.crs;if(!i.infinite){var e=this._globalTileRange;if(!i.wrapLng&&(t.x<e.min.x||t.x>e.max.x)||!i.wrapLat&&(t.y<e.min.y||t.y>e.max.y))return!1}if(!this.options.bounds)return!0;t=this._tileCoordsToBounds(t);return R(this.options.bounds).overlaps(t)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var i=this._map,e=this.getTileSize(),s=t.scaleBy(e),e=s.add(e);return[i.unproject(s,t.z),i.unproject(e,t.z)]},_tileCoordsToBounds:function(t){t=this._tileCoordsToNwSe(t),t=new N(t[0],t[1]);return t=!this.options.noWrap?this._map.wrapLatLngBounds(t):t},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var i=t.split(":"),t=new A(+i[0],+i[1]);return t.z=+i[2],t},_removeTile:function(t){var i=this._tiles[t];i&&(si(i.el),delete this._tiles[t],this.fire("tileunload",{tile:i.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){hi(t,"leaflet-tile");var i=this.getTileSize();t.style.width=i.x+"px",t.style.height=i.y+"px",t.onselectstart=c,t.onmousemove=c,Et.ielt9&&this.options.opacity<1&&di(t,this.options.opacity)},_addTile:function(t,i){var e=this._getTilePos(t),s=this._tileCoordsToKey(t),n=this.createTile(this._wrapCoords(t),r(this._tileReady,this,t));this._initTile(n),this.createTile.length<2&&C(r(this._tileReady,this,t,null,n)),mi(n,e),this._tiles[s]={el:n,coords:t,current:!0},i.appendChild(n),this.fire("tileloadstart",{tile:n,coords:t})},_tileReady:function(t,i,e){i&&this.fire("tileerror",{error:i,tile:e,coords:t});var s=this._tileCoordsToKey(t);(e=this._tiles[s])&&(e.loaded=+new Date,this._map._fadeAnimated?(di(e.el,0),T(this._fadeFrame),this._fadeFrame=C(this._updateOpacity,this)):(e.active=!0,this._pruneTiles()),i||(hi(e.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:e.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Et.ielt9||!this._map._fadeAnimated?C(this._pruneTiles,this):setTimeout(r(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var i=new A(this._wrapX?n(t.x,this._wrapX):t.x,this._wrapY?n(t.y,this._wrapY):t.y);return i.z=t.z,i},_pxBoundsToTileRange:function(t){var i=this.getTileSize();return new Z(t.min.unscaleBy(i).floor(),t.max.unscaleBy(i).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});var je=Re.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,i){this._url=t,(i=_(this,i)).detectRetina&&Et.retina&&0<i.maxZoom?(i.tileSize=Math.floor(i.tileSize/2),i.zoomReverse?(i.zoomOffset--,i.minZoom=Math.min(i.maxZoom,i.minZoom+1)):(i.zoomOffset++,i.maxZoom=Math.max(i.minZoom,i.maxZoom-1)),i.minZoom=Math.max(0,i.minZoom)):i.zoomReverse?i.minZoom=Math.min(i.maxZoom,i.minZoom):i.maxZoom=Math.max(i.minZoom,i.maxZoom),"string"==typeof i.subdomains&&(i.subdomains=i.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,i){return this._url===t&&void 0===i&&(i=!0),this._url=t,i||this.redraw(),this},createTile:function(t,i){var e=document.createElement("img");return bi(e,"load",r(this._tileOnLoad,this,i,e)),bi(e,"error",r(this._tileOnError,this,i,e)),!this.options.crossOrigin&&""!==this.options.crossOrigin||(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(e.referrerPolicy=this.options.referrerPolicy),e.alt="",e.src=this.getTileUrl(t),e},getTileUrl:function(t){var i={r:Et.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};return this._map&&!this._map.options.crs.infinite&&(t=this._globalTileRange.max.y-t.y,this.options.tms&&(i.y=t),i["-y"]=t),f(this._url,l(i,this.options))},_tileOnLoad:function(t,i){Et.ielt9?setTimeout(r(t,this,null,i),0):t(null,i)},_tileOnError:function(t,i,e){var s=this.options.errorTileUrl;s&&i.getAttribute("src")!==s&&(i.src=s),t(e,i)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,i=this.options.maxZoom;return(t=this.options.zoomReverse?i-t:t)+this.options.zoomOffset},_getSubdomain:function(t){t=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[t]},_abortLoading:function(){var t,i,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=c,e.onerror=c,e.complete||(e.src=y,i=this._tiles[t].coords,si(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:i})))},_removeTile:function(t){var i=this._tiles[t];if(i)return i.el.setAttribute("src",y),Re.prototype._removeTile.call(this,t)},_tileReady:function(t,i,e){if(this._map&&(!e||e.getAttribute("src")!==y))return Re.prototype._tileReady.call(this,t,i,e)}});function De(t,i){return new je(t,i)}var qe=je.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,i){this._url=t;var e,s=l({},this.defaultWmsParams);for(e in i)e in this.options||(s[e]=i[e]);var n=(i=_(this,i)).detectRetina&&Et.retina?2:1,t=this.getTileSize();s.width=t.x*n,s.height=t.y*n,this.wmsParams=s},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var i=1.3<=this._wmsVersion?"crs":"srs";this.wmsParams[i]=this._crs.code,je.prototype.onAdd.call(this,t)},getTileUrl:function(t){var i=this._tileCoordsToNwSe(t),e=this._crs,e=B(e.project(i[0]),e.project(i[1])),i=e.min,e=e.max,e=(1.3<=this._wmsVersion&&this._crs===le?[i.y,i.x,e.y,e.x]:[i.x,i.y,e.x,e.y]).join(","),t=je.prototype.getTileUrl.call(this,t);return t+p(this.wmsParams,t,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+e},setParams:function(t,i){return l(this.wmsParams,t),i||this.redraw(),this}});je.WMS=qe,De.wms=function(t,i){return new qe(t,i)};var Ge=k.extend({options:{padding:.1},initialize:function(t){_(this,t),h(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),hi(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,i){var e=this._map.getZoomScale(i,this._zoom),s=this._map.getSize().multiplyBy(.5+this.options.padding),n=this._map.project(this._center,i),i=s.multiplyBy(-e).add(n).subtract(this._map._getNewPixelOrigin(t,i));Et.any3d?pi(this._container,i,e):mi(this._container,i)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,i=this._map.getSize(),e=this._map.containerPointToLayerPoint(i.multiplyBy(-t)).round();this._bounds=new Z(e,e.add(i.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Fe=Ge.extend({options:{tolerance:0},getEvents:function(){var t=Ge.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Ge.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");bi(t,"mousemove",this._onMouseMove,this),bi(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),bi(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){T(this._redrawRequest),delete this._ctx,si(this._container),Li(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){var t,i,e,s;this._map._animatingZoom&&this._bounds||(Ge.prototype._update.call(this),t=this._bounds,i=this._container,e=t.getSize(),s=Et.retina?2:1,mi(i,t.min),i.width=s*e.x,i.height=s*e.y,i.style.width=e.x+"px",i.style.height=e.y+"px",Et.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update"))},_reset:function(){Ge.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t);t=(this._layers[h(t)]=t)._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=t),this._drawLast=t,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var i=t._order,e=i.next,i=i.prev;e?e.prev=i:this._drawLast=i,i?i.next=e:this._drawFirst=e,delete t._order,delete this._layers[h(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){for(var i,e=t.options.dashArray.split(/[, ]+/),s=[],n=0;n<e.length;n++){if(i=Number(e[n]),isNaN(i))return;s.push(i)}t.options._dashArray=s}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||C(this._redraw,this))},_extendRedrawBounds:function(t){var i;t._pxBounds&&(i=(t.options.weight||0)+1,this._redrawBounds=this._redrawBounds||new Z,this._redrawBounds.extend(t._pxBounds.min.subtract([i,i])),this._redrawBounds.extend(t._pxBounds.max.add([i,i])))},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t,i=this._redrawBounds;i?(t=i.getSize(),this._ctx.clearRect(i.min.x,i.min.y,t.x,t.y)):(this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore())},_draw:function(){var t,i,e=this._redrawBounds;this._ctx.save(),e&&(i=e.getSize(),this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,i.x,i.y),this._ctx.clip()),this._drawing=!0;for(var s=this._drawFirst;s;s=s.next)t=s.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,i){if(this._drawing){var e,s,n,o,a=t._parts,r=a.length,h=this._ctx;if(r){for(h.beginPath(),e=0;e<r;e++){for(s=0,n=a[e].length;s<n;s++)o=a[e][s],h[s?"lineTo":"moveTo"](o.x,o.y);i&&h.closePath()}this._fillStroke(h,t)}}},_updateCircle:function(t){var i,e,s,n;this._drawing&&!t._empty()&&(i=t._point,e=this._ctx,s=Math.max(Math.round(t._radius),1),1!=(n=(Math.max(Math.round(t._radiusY),1)||s)/s)&&(e.save(),e.scale(1,n)),e.beginPath(),e.arc(i.x,i.y/n,s,0,2*Math.PI,!1),1!=n&&e.restore(),this._fillStroke(e,t))},_fillStroke:function(t,i){var e=i.options;e.fill&&(t.globalAlpha=e.fillOpacity,t.fillStyle=e.fillColor||e.color,t.fill(e.fillRule||"evenodd")),e.stroke&&0!==e.weight&&(t.setLineDash&&t.setLineDash(i.options&&i.options._dashArray||[]),t.globalAlpha=e.opacity,t.lineWidth=e.weight,t.strokeStyle=e.color,t.lineCap=e.lineCap,t.lineJoin=e.lineJoin,t.stroke())},_onClick:function(t){for(var i,e,s=this._map.mouseEventToLayerPoint(t),n=this._drawFirst;n;n=n.next)(i=n.layer).options.interactive&&i._containsPoint(s)&&(("click"===t.type||"preclick"===t.type)&&this._map._draggableMoved(i)||(e=i));this._fireEvent(!!e&&[e],t)},_onMouseMove:function(t){var i;!this._map||this._map.dragging.moving()||this._map._animatingZoom||(i=this._map.mouseEventToLayerPoint(t),this._handleMouseHover(t,i))},_handleMouseOut:function(t){var i=this._hoveredLayer;i&&(li(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,i){if(!this._mouseHoverThrottled){for(var e,s,n=this._drawFirst;n;n=n.next)(e=n.layer).options.interactive&&e._containsPoint(i)&&(s=e);s!==this._hoveredLayer&&(this._handleMouseOut(t),s&&(hi(this._container,"leaflet-interactive"),this._fireEvent([s],t,"mouseover"),this._hoveredLayer=s)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(r(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(t,i,e){this._map._fireDOMEvent(i,e||i.type,t)},_bringToFront:function(t){var i,e,s=t._order;s&&(i=s.next,e=s.prev,i&&((i.prev=e)?e.next=i:i&&(this._drawFirst=i),s.prev=this._drawLast,(this._drawLast.next=s).next=null,this._drawLast=s,this._requestRedraw(t)))},_bringToBack:function(t){var i,e,s=t._order;s&&(i=s.next,(e=s.prev)&&((e.next=i)?i.prev=e:e&&(this._drawLast=e),s.prev=null,s.next=this._drawFirst,this._drawFirst.prev=s,this._drawFirst=s,this._requestRedraw(t)))}});function He(t){return Et.canvas?new Fe(t):null}var Ue=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),nt={_initContainer:function(){this._container=ei("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Ge.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var i=t._container=Ue("shape");hi(i,"leaflet-vml-shape "+(this.options.className||"")),i.coordsize="1 1",t._path=Ue("path"),i.appendChild(t._path),this._updateStyle(t),this._layers[h(t)]=t},_addPath:function(t){var i=t._container;this._container.appendChild(i),t.options.interactive&&t.addInteractiveTarget(i)},_removePath:function(t){var i=t._container;si(i),t.removeInteractiveTarget(i),delete this._layers[h(t)]},_updateStyle:function(t){var i=t._stroke,e=t._fill,s=t.options,n=t._container;n.stroked=!!s.stroke,n.filled=!!s.fill,s.stroke?(i=i||(t._stroke=Ue("stroke")),n.appendChild(i),i.weight=s.weight+"px",i.color=s.color,i.opacity=s.opacity,s.dashArray?i.dashStyle=g(s.dashArray)?s.dashArray.join(" "):s.dashArray.replace(/( *, *)/g," "):i.dashStyle="",i.endcap=s.lineCap.replace("butt","flat"),i.joinstyle=s.lineJoin):i&&(n.removeChild(i),t._stroke=null),s.fill?(e=e||(t._fill=Ue("fill")),n.appendChild(e),e.color=s.fillColor||s.color,e.opacity=s.fillOpacity):e&&(n.removeChild(e),t._fill=null)},_updateCircle:function(t){var i=t._point.round(),e=Math.round(t._radius),s=Math.round(t._radiusY||e);this._setPath(t,t._empty()?"M0 0":"AL "+i.x+","+i.y+" "+e+","+s+" 0,23592600")},_setPath:function(t,i){t._path.v=i},_bringToFront:function(t){oi(t._container)},_bringToBack:function(t){ai(t._container)}},We=Et.vml?Ue:X,Ve=Ge.extend({_initContainer:function(){this._container=We("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=We("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){si(this._container),Li(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){var t,i,e;this._map._animatingZoom&&this._bounds||(Ge.prototype._update.call(this),i=(t=this._bounds).getSize(),e=this._container,this._svgSize&&this._svgSize.equals(i)||(this._svgSize=i,e.setAttribute("width",i.x),e.setAttribute("height",i.y)),mi(e,t.min),e.setAttribute("viewBox",[t.min.x,t.min.y,i.x,i.y].join(" ")),this.fire("update"))},_initPath:function(t){var i=t._path=We("path");t.options.className&&hi(i,t.options.className),t.options.interactive&&hi(i,"leaflet-interactive"),this._updateStyle(t),this._layers[h(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){si(t._path),t.removeInteractiveTarget(t._path),delete this._layers[h(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var i=t._path,t=t.options;i&&(t.stroke?(i.setAttribute("stroke",t.color),i.setAttribute("stroke-opacity",t.opacity),i.setAttribute("stroke-width",t.weight),i.setAttribute("stroke-linecap",t.lineCap),i.setAttribute("stroke-linejoin",t.lineJoin),t.dashArray?i.setAttribute("stroke-dasharray",t.dashArray):i.removeAttribute("stroke-dasharray"),t.dashOffset?i.setAttribute("stroke-dashoffset",t.dashOffset):i.removeAttribute("stroke-dashoffset")):i.setAttribute("stroke","none"),t.fill?(i.setAttribute("fill",t.fillColor||t.color),i.setAttribute("fill-opacity",t.fillOpacity),i.setAttribute("fill-rule",t.fillRule||"evenodd")):i.setAttribute("fill","none"))},_updatePoly:function(t,i){this._setPath(t,J(t._parts,i))},_updateCircle:function(t){var i=t._point,e=Math.max(Math.round(t._radius),1),s="a"+e+","+(Math.max(Math.round(t._radiusY),1)||e)+" 0 1,0 ",e=t._empty()?"M0 0":"M"+(i.x-e)+","+i.y+s+2*e+",0 "+s+2*-e+",0 ";this._setPath(t,e)},_setPath:function(t,i){t._path.setAttribute("d",i)},_bringToFront:function(t){oi(t._path)},_bringToBack:function(t){ai(t._path)}});function Ke(t){return Et.svg||Et.vml?new Ve(t):null}Et.vml&&Ve.include(nt),qi.include({getRenderer:function(t){t=(t=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer)||(this._renderer=this._createRenderer());return this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var i=this._paneRenderers[t];return void 0===i&&(i=this._createRenderer({pane:t}),this._paneRenderers[t]=i),i},_createRenderer:function(t){return this.options.preferCanvas&&He(t)||Ke(t)}});var Xe=Me.extend({initialize:function(t,i){Me.prototype.initialize.call(this,this._boundsToLatLngs(t),i)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=R(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});Ve.create=We,Ve.pointsToPath=J,xe.geometryToLayer=we,xe.coordsToLatLng=Pe,xe.coordsToLatLngs=Le,xe.latLngToCoords=Ce,xe.latLngsToCoords=Te,xe.getFeature=Se,xe.asFeature=Ee,qi.mergeOptions({boxZoom:!0});F=xt.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){bi(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Li(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){si(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),Vt(),gi(),this._startPoint=this._map.mouseEventToContainerPoint(t),bi(document,{contextmenu:Ii,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=ei("div","leaflet-zoom-box",this._container),hi(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var i=new Z(this._point,this._startPoint),t=i.getSize();mi(this._box,i.min),this._box.style.width=t.x+"px",this._box.style.height=t.y+"px"},_finish:function(){this._moved&&(si(this._box),li(this._container,"leaflet-crosshair")),Kt(),vi(),Li(document,{contextmenu:Ii,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){1!==t.which&&1!==t.button||(this._finish(),this._moved&&(this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(r(this._resetState,this),0),t=new N(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point)),this._map.fitBounds(t).fire("boxzoomend",{boxZoomBounds:t})))},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});qi.addInitHook("addHandler","boxZoom",F),qi.mergeOptions({doubleClickZoom:!0});Q=xt.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var i=this._map,e=i.getZoom(),s=i.options.zoomDelta,s=t.originalEvent.shiftKey?e-s:e+s;"center"===i.options.doubleClickZoom?i.setZoom(s):i.setZoomAround(t.containerPoint,s)}});qi.addInitHook("addHandler","doubleClickZoom",Q),qi.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});V=xt.extend({addHooks:function(){var t;this._draggable||(t=this._map,this._draggable=new Xi(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))),hi(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){li(this._map._container,"leaflet-grab"),li(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t,i=this._map;i._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity?(t=R(this._map.options.maxBounds),this._offsetLimit=B(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))):this._offsetLimit=null,i.fire("movestart").fire("dragstart"),i.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){var i,e;this._map.options.inertia&&(i=this._lastTime=+new Date,e=this._lastPos=this._draggable._absPos||this._draggable._newPos,this._positions.push(e),this._times.push(i),this._prunePositions(i)),this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;1<this._positions.length&&50<t-this._times[0];)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),i=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=i.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,i){return t-(t-i)*this._viscosity},_onPreDragLimit:function(){var t,i;this._viscosity&&this._offsetLimit&&(t=this._draggable._newPos.subtract(this._draggable._startPos),i=this._offsetLimit,t.x<i.min.x&&(t.x=this._viscousLimit(t.x,i.min.x)),t.y<i.min.y&&(t.y=this._viscousLimit(t.y,i.min.y)),t.x>i.max.x&&(t.x=this._viscousLimit(t.x,i.max.x)),t.y>i.max.y&&(t.y=this._viscousLimit(t.y,i.max.y)),this._draggable._newPos=this._draggable._startPos.add(t))},_onPreDragWrap:function(){var t=this._worldWidth,i=Math.round(t/2),e=this._initialWorldOffset,s=this._draggable._newPos.x,n=(s-i+e)%t+i-e,i=(s+i+e)%t-i-e,i=Math.abs(n+e)<Math.abs(i+e)?n:i;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=i},_onDragEnd:function(t){var i,e,s,n,o=this._map,a=o.options,r=!a.inertia||t.noInertia||this._times.length<2;o.fire("dragend",t),r?o.fire("moveend"):(this._prunePositions(+new Date),e=this._lastPos.subtract(this._positions[0]),t=(this._lastTime-this._times[0])/1e3,i=a.easeLinearity,e=(r=e.multiplyBy(i/t)).distanceTo([0,0]),t=Math.min(a.inertiaMaxSpeed,e),e=r.multiplyBy(t/e),s=t/(a.inertiaDeceleration*i),(n=e.multiplyBy(-s/2).round()).x||n.y?(n=o._limitOffset(n,o.options.maxBounds),C(function(){o.panBy(n,{duration:s,easeLinearity:i,noMoveStart:!0,animate:!0})})):o.fire("moveend"))}});qi.addInitHook("addHandler","dragging",V),qi.mergeOptions({keyboard:!0,keyboardPanDelta:80});K=xt.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),bi(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Li(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){var t,i,e;this._focused||(t=document.body,e=document.documentElement,i=t.scrollTop||e.scrollTop,e=t.scrollLeft||e.scrollLeft,this._map._container.focus(),window.scrollTo(e,i))},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){for(var i=this._panKeys={},e=this.keyCodes,s=0,n=e.left.length;s<n;s++)i[e.left[s]]=[-1*t,0];for(s=0,n=e.right.length;s<n;s++)i[e.right[s]]=[t,0];for(s=0,n=e.down.length;s<n;s++)i[e.down[s]]=[0,t];for(s=0,n=e.up.length;s<n;s++)i[e.up[s]]=[0,-1*t]},_setZoomDelta:function(t){for(var i=this._zoomKeys={},e=this.keyCodes,s=0,n=e.zoomIn.length;s<n;s++)i[e.zoomIn[s]]=t;for(s=0,n=e.zoomOut.length;s<n;s++)i[e.zoomOut[s]]=-t},_addHooks:function(){bi(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Li(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var i,e,s=t.keyCode,n=this._map;if(s in this._panKeys)n._panAnim&&n._panAnim._inProgress||(e=this._panKeys[s],t.shiftKey&&(e=I(e).multiplyBy(3)),n.options.maxBounds&&(e=n._limitOffset(I(e),n.options.maxBounds)),n.options.worldCopyJump?(i=n.wrapLatLng(n.unproject(n.project(n.getCenter()).add(e))),n.panTo(i)):n.panBy(e));else if(s in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[s]);else{if(27!==s||!n._popup||!n._popup.options.closeOnEscapeKey)return;n.closePopup()}Ii(t)}}});qi.addInitHook("addHandler","keyboard",K),qi.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});Tt=xt.extend({addHooks:function(){bi(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Li(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var i=Ri(t),e=this._map.options.wheelDebounceTime;this._delta+=i,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);e=Math.max(e-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(r(this._performZoom,this),e),Ii(t)},_performZoom:function(){var t=this._map,i=t.getZoom(),e=this._map.options.zoomSnap||0;t._stop();var s=this._delta/(4*this._map.options.wheelPxPerZoomLevel),s=4*Math.log(2/(1+Math.exp(-Math.abs(s))))/Math.LN2,s=e?Math.ceil(s/e)*e:s,s=t._limitZoom(i+(0<this._delta?s:-s))-i;this._delta=0,this._startTime=null,s&&("center"===t.options.scrollWheelZoom?t.setZoom(i+s):t.setZoomAround(this._lastMousePos,i+s))}});qi.addInitHook("addHandler","scrollWheelZoom",Tt);qi.mergeOptions({tapHold:Et.touchNative&&Et.safari&&Et.mobile,tapTolerance:15});H=xt.extend({addHooks:function(){bi(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Li(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){var i;clearTimeout(this._holdTimeout),1===t.touches.length&&(i=t.touches[0],this._startPos=this._newPos=new A(i.clientX,i.clientY),this._holdTimeout=setTimeout(r(function(){this._cancel(),this._isTapValid()&&(bi(document,"touchend",Oi),bi(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",i))},this),600),bi(document,"touchend touchcancel contextmenu",this._cancel,this),bi(document,"touchmove",this._onMove,this))},_cancelClickPrevent:function t(){Li(document,"touchend",Oi),Li(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),Li(document,"touchend touchcancel contextmenu",this._cancel,this),Li(document,"touchmove",this._onMove,this)},_onMove:function(t){t=t.touches[0];this._newPos=new A(t.clientX,t.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,i){t=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:i.screenX,screenY:i.screenY,clientX:i.clientX,clientY:i.clientY});t._simulated=!0,i.target.dispatchEvent(t)}});qi.addInitHook("addHandler","tapHold",H),qi.mergeOptions({touchZoom:Et.touch,bounceAtZoomLimits:!0});nt=xt.extend({addHooks:function(){hi(this._map._container,"leaflet-touch-zoom"),bi(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){li(this._map._container,"leaflet-touch-zoom"),Li(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var i,e,s=this._map;!t.touches||2!==t.touches.length||s._animatingZoom||this._zooming||(i=s.mouseEventToContainerPoint(t.touches[0]),e=s.mouseEventToContainerPoint(t.touches[1]),this._centerPoint=s.getSize()._divideBy(2),this._startLatLng=s.containerPointToLatLng(this._centerPoint),"center"!==s.options.touchZoom&&(this._pinchStartLatLng=s.containerPointToLatLng(i.add(e)._divideBy(2))),this._startDist=i.distanceTo(e),this._startZoom=s.getZoom(),this._moved=!1,this._zooming=!0,s._stop(),bi(document,"touchmove",this._onTouchMove,this),bi(document,"touchend touchcancel",this._onTouchEnd,this),Oi(t))},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var i=this._map,e=i.mouseEventToContainerPoint(t.touches[0]),s=i.mouseEventToContainerPoint(t.touches[1]),n=e.distanceTo(s)/this._startDist;if(this._zoom=i.getScaleZoom(n,this._startZoom),!i.options.bounceAtZoomLimits&&(this._zoom<i.getMinZoom()&&n<1||this._zoom>i.getMaxZoom()&&1<n)&&(this._zoom=i._limitZoom(this._zoom)),"center"===i.options.touchZoom){if(this._center=this._startLatLng,1==n)return}else{s=e._add(s)._divideBy(2)._subtract(this._centerPoint);if(1==n&&0===s.x&&0===s.y)return;this._center=i.unproject(i.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(i._moveStart(!0,!1),this._moved=!0),T(this._animRequest);i=r(i._move,i,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=C(i,this,!0),Oi(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,T(this._animRequest),Li(document,"touchmove",this._onTouchMove,this),Li(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});qi.addInitHook("addHandler","touchZoom",nt),qi.BoxZoom=F,qi.DoubleClickZoom=Q,qi.Drag=V,qi.Keyboard=K,qi.ScrollWheelZoom=Tt,qi.TapHold=H,qi.TouchZoom=nt,t.Bounds=Z,t.Browser=Et,t.CRS=q,t.Canvas=Fe,t.Circle=ve,t.CircleMarker=ge,t.Class=E,t.Control=Fi,t.DivIcon=Ne,t.DivOverlay=Ie,t.DomEvent=Mt,t.DomUtil=yt,t.Draggable=Xi,t.Evented=z,t.FeatureGroup=ue,t.GeoJSON=xe,t.GridLayer=Re,t.Handler=xt,t.Icon=de,t.ImageOverlay=ze,t.LatLng=j,t.LatLngBounds=N,t.Layer=k,t.LayerGroup=ce,t.LineUtil=Pt,t.Map=qi,t.Marker=me,t.Mixin=bt,t.Path=fe,t.Point=A,t.PolyUtil=wt,t.Polygon=Me,t.Polyline=ye,t.Popup=Ze,t.PosAnimation=Di,t.Projection=Ct,t.Rectangle=Xe,t.Renderer=Ge,t.SVG=Ve,t.SVGOverlay=Oe,t.TileLayer=je,t.Tooltip=Be,t.Transformation=U,t.Util=S,t.VideoOverlay=Ae,t.bind=r,t.bounds=B,t.canvas=He,t.circle=function(t,i,e){return new ve(t,i,e)},t.circleMarker=function(t,i){return new ge(t,i)},t.control=Gi,t.divIcon=function(t){return new Ne(t)},t.extend=l,t.featureGroup=function(t,i){return new ue(t,i)},t.geoJSON=ke,t.geoJson=Lt,t.gridLayer=function(t){return new Re(t)},t.icon=function(t){return new de(t)},t.imageOverlay=function(t,i,e){return new ze(t,i,e)},t.latLng=D,t.latLngBounds=R,t.layerGroup=function(t,i){return new ce(t,i)},t.map=function(t,i){return new qi(t,i)},t.marker=function(t,i){return new me(t,i)},t.point=I,t.polygon=function(t,i){return new Me(t,i)},t.polyline=function(t,i){return new ye(t,i)},t.popup=function(t,i){return new Ze(t,i)},t.rectangle=function(t,i){return new Xe(t,i)},t.setOptions=_,t.stamp=h,t.svg=Ke,t.svgOverlay=function(t,i,e){return new Oe(t,i,e)},t.tileLayer=De,t.tooltip=function(t,i){return new Be(t,i)},t.transformation=W,t.version="1.9.4",t.videoOverlay=function(t,i,e){return new Ae(t,i,e)};var Je=window.L;t.noConflict=function(){return window.L=Je,this},window.L=t}),function(t,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i():"function"==typeof define&&define.amd?define(i):t.proj4=i()}(window,function(){"use strict";var _=1,p=2,m=4,f=5,b=484813681109536e-20,g=Math.PI/2,v=.16666666666666666,y=.04722222222222222,M=.022156084656084655,x=1e-10,r=.017453292519943295,o=57.29577951308232,w=Math.PI/4,e=2*Math.PI,c=3.14159265359,h={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667},l={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},a=/[\s_\-\/\(\)]/g;function P(t,i){if(t[i])return t[i];for(var e,s=Object.keys(t),n=i.toLowerCase().replace(a,""),o=-1;++o<s.length;)if((e=s[o]).toLowerCase().replace(a,"")===n)return t[e]}var n=function(t){var i,e,s,n={},o=t.split("+").map(function(t){return t.trim()}).filter(function(t){return t}).reduce(function(t,i){i=i.split("=");return i.push(!0),t[i[0].toLowerCase()]=i[1],t},{}),a={proj:"projName",datum:"datumCode",rf:function(t){n.rf=parseFloat(t)},lat_0:function(t){n.lat0=t*r},lat_1:function(t){n.lat1=t*r},lat_2:function(t){n.lat2=t*r},lat_ts:function(t){n.lat_ts=t*r},lon_0:function(t){n.long0=t*r},lon_1:function(t){n.long1=t*r},lon_2:function(t){n.long2=t*r},alpha:function(t){n.alpha=parseFloat(t)*r},lonc:function(t){n.longc=t*r},x_0:function(t){n.x0=parseFloat(t)},y_0:function(t){n.y0=parseFloat(t)},k_0:function(t){n.k0=parseFloat(t)},k:function(t){n.k0=parseFloat(t)},a:function(t){n.a=parseFloat(t)},b:function(t){n.b=parseFloat(t)},r_a:function(){n.R_A=!0},zone:function(t){n.zone=parseInt(t,10)},south:function(){n.utmSouth=!0},towgs84:function(t){n.datum_params=t.split(",").map(function(t){return parseFloat(t)})},to_meter:function(t){n.to_meter=parseFloat(t)},units:function(t){n.units=t;t=P(l,t);t&&(n.to_meter=t.to_meter)},from_greenwich:function(t){n.from_greenwich=t*r},pm:function(t){var i=P(h,t);n.from_greenwich=(i||parseFloat(t))*r},nadgrids:function(t){"@null"===t?n.datumCode="none":n.nadgrids=t},axis:function(t){var i="ewnsud";3===t.length&&-1!==i.indexOf(t.substr(0,1))&&-1!==i.indexOf(t.substr(1,1))&&-1!==i.indexOf(t.substr(2,1))&&(n.axis=t)}};for(i in o)e=o[i],i in a?"function"==typeof(s=a[i])?s(e):n[s]=e:n[i]=e;return"string"==typeof n.datumCode&&"WGS84"!==n.datumCode&&(n.datumCode=n.datumCode.toLowerCase()),n},i=/\s/,s=/[A-Za-z]/,u=/[A-Za-z84]/,d=/[,\]]/,L=/[\d\.E\-\+]/;function C(t){if("string"!=typeof t)throw new Error("not a string");this.text=t.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=1}function T(t,i,e){Array.isArray(i)&&(e.unshift(i),i=null);e=e.reduce(function(t,i){return S(i,t),t},i?{}:t);i&&(t[i]=e)}function S(t,i){if(Array.isArray(t)){var e,s=t.shift();if("PARAMETER"===s&&(s=t.shift()),1===t.length)return Array.isArray(t[0])?(i[s]={},void S(t[0],i[s])):void(i[s]=t[0]);if(t.length)if("TOWGS84"!==s){if("AXIS"===s)return s in i||(i[s]=[]),void i[s].push(t);switch(Array.isArray(s)||(i[s]={}),s){case"UNIT":case"PRIMEM":case"VERT_DATUM":return i[s]={name:t[0].toLowerCase(),convert:t[1]},void(3===t.length&&S(t[2],i[s]));case"SPHEROID":case"ELLIPSOID":return i[s]={name:t[0],a:t[1],rf:t[2]},void(4===t.length&&S(t[3],i[s]));case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":return t[0]=["name",t[0]],void T(i,s,t);default:for(e=-1;++e<t.length;)if(!Array.isArray(t[e]))return S(t,i[s]);return T(i,s,t)}}else i[s]=t;else i[s]=!0}else i[t]=!0}C.prototype.readCharicter=function(){var t=this.text[this.place++];if(4!==this.state)for(;i.test(t);){if(this.place>=this.text.length)return;t=this.text[this.place++]}switch(this.state){case 1:return this.neutral(t);case 2:return this.keyword(t);case 4:return this.quoted(t);case 5:return this.afterquote(t);case 3:return this.number(t);case-1:return}},C.prototype.afterquote=function(t){if('"'===t)return this.word+='"',void(this.state=4);if(d.test(t))return this.word=this.word.trim(),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in afterquote yet, index '+this.place)},C.prototype.afterItem=function(t){if(","===t)return null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=1);"]"===t&&(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=1,this.currentObject=this.stack.pop(),this.currentObject||(this.state=-1))},C.prototype.number=function(t){if(!L.test(t)){if(d.test(t))return this.word=parseFloat(this.word),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in number yet, index '+this.place)}this.word+=t},C.prototype.quoted=function(t){'"'!==t?this.word+=t:this.state=5},C.prototype.keyword=function(t){if(u.test(t))this.word+=t;else{if("["===t){var i=[];return i.push(this.word),this.level++,null===this.root?this.root=i:this.currentObject.push(i),this.stack.push(this.currentObject),this.currentObject=i,void(this.state=1)}if(!d.test(t))throw new Error("havn't handled \""+t+'" in keyword yet, index '+this.place);this.afterItem(t)}},C.prototype.neutral=function(t){if(s.test(t))return this.word=t,void(this.state=2);if('"'===t)return this.word="",void(this.state=4);if(L.test(t))return this.word=t,void(this.state=3);if(!d.test(t))throw new Error("havn't handled \""+t+'" in neutral yet, index '+this.place);this.afterItem(t)},C.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(-1===this.state)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function E(t){return.017453292519943295*t}function k(n){if("GEOGCS"===n.type?n.projName="longlat":"LOCAL_CS"===n.type?(n.projName="identity",n.local=!0):"object"==typeof n.PROJECTION?n.projName=Object.keys(n.PROJECTION)[0]:n.projName=n.PROJECTION,n.AXIS){for(var t="",i=0,e=n.AXIS.length;i<e;++i){var s=n.AXIS[i][0].toLowerCase();-1!==s.indexOf("north")?t+="n":-1!==s.indexOf("south")?t+="s":-1!==s.indexOf("east")?t+="e":-1!==s.indexOf("west")&&(t+="w")}2===t.length&&(t+="u"),3===t.length&&(n.axis=t)}n.UNIT&&(n.units=n.UNIT.name.toLowerCase(),"metre"===n.units&&(n.units="meter"),n.UNIT.convert&&("GEOGCS"===n.type?n.DATUM&&n.DATUM.SPHEROID&&(n.to_meter=n.UNIT.convert*n.DATUM.SPHEROID.a):n.to_meter=n.UNIT.convert));var o=n.GEOGCS;function a(t){return t*(n.to_meter||1)}(o="GEOGCS"===n.type?n:o)&&(o.DATUM?n.datumCode=o.DATUM.name.toLowerCase():n.datumCode=o.name.toLowerCase(),"d_"===n.datumCode.slice(0,2)&&(n.datumCode=n.datumCode.slice(2)),"new_zealand_geodetic_datum_1949"!==n.datumCode&&"new_zealand_1949"!==n.datumCode||(n.datumCode="nzgd49"),"wgs_1984"!==n.datumCode&&"world_geodetic_system_1984"!==n.datumCode||("Mercator_Auxiliary_Sphere"===n.PROJECTION&&(n.sphere=!0),n.datumCode="wgs84"),"_ferro"===n.datumCode.slice(-6)&&(n.datumCode=n.datumCode.slice(0,-6)),"_jakarta"===n.datumCode.slice(-8)&&(n.datumCode=n.datumCode.slice(0,-8)),~n.datumCode.indexOf("belge")&&(n.datumCode="rnb72"),o.DATUM&&o.DATUM.SPHEROID&&(n.ellps=o.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===n.ellps.toLowerCase().slice(0,13)&&(n.ellps="intl"),n.a=o.DATUM.SPHEROID.a,n.rf=parseFloat(o.DATUM.SPHEROID.rf,10)),o.DATUM&&o.DATUM.TOWGS84&&(n.datum_params=o.DATUM.TOWGS84),~n.datumCode.indexOf("osgb_1936")&&(n.datumCode="osgb36"),~n.datumCode.indexOf("osni_1952")&&(n.datumCode="osni52"),(~n.datumCode.indexOf("tm65")||~n.datumCode.indexOf("geodetic_datum_of_1965"))&&(n.datumCode="ire65"),"ch1903+"===n.datumCode&&(n.datumCode="ch1903"),~n.datumCode.indexOf("israel")&&(n.datumCode="isr93")),n.b&&!isFinite(n.b)&&(n.b=n.a);[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_2","Standard_Parallel_2"],["false_easting","False_Easting"],["false_northing","False_Northing"],["central_meridian","Central_Meridian"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",E],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",E],["x0","false_easting",a],["y0","false_northing",a],["long0","central_meridian",E],["lat0","latitude_of_origin",E],["lat0","standard_parallel_1",E],["lat1","standard_parallel_1",E],["lat2","standard_parallel_2",E],["azimuth","Azimuth"],["alpha","azimuth",E],["srsCode","name"]].forEach(function(t){var i,e,s;i=n,s=(e=t)[0],t=e[1],!(s in i)&&t in i&&(i[s]=i[t],3===e.length&&(i[s]=e[2](i[s])))}),n.long0||!n.longc||"Albers_Conic_Equal_Area"!==n.projName&&"Lambert_Azimuthal_Equal_Area"!==n.projName||(n.long0=n.longc),n.lat_ts||!n.lat1||"Stereographic_South_Pole"!==n.projName&&"Polar Stereographic (variant B)"!==n.projName||(n.lat0=E(0<n.lat1?90:-90),n.lat_ts=n.lat1)}var z=function(t){var i=new C(t).output(),e=i.shift(),t=i.shift();i.unshift(["name",t]),i.unshift(["type",e]);e={};return S(i,e),k(e),e};function A(t){var i=this;if(2===arguments.length){var e=arguments[1];"string"==typeof e?"+"===e.charAt(0)?A[t]=n(arguments[1]):A[t]=z(arguments[1]):A[t]=e}else if(1===arguments.length){if(Array.isArray(t))return t.map(function(t){Array.isArray(t)?A.apply(i,t):A(t)});if("string"==typeof t){if(t in A)return A[t]}else"EPSG"in t?A["EPSG:"+t.EPSG]=t:"ESRI"in t?A["ESRI:"+t.ESRI]=t:"IAU2000"in t?A["IAU2000:"+t.IAU2000]=t:console.log(t)}}(Yi=A)("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),Yi("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),Yi("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),Yi.WGS84=Yi["EPSG:4326"],Yi["EPSG:3785"]=Yi["EPSG:3857"],Yi.GOOGLE=Yi["EPSG:3857"],Yi["EPSG:900913"]=Yi["EPSG:3857"],Yi["EPSG:102113"]=Yi["EPSG:3857"];var O=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];var I=["3857","900913","3785","102113"];function Z(t){if("string"!=typeof t)return t;if(t in A)return A[t];if(s=t,O.some(function(t){return-1<s.indexOf(t)})){var i=z(t);if(function(t){if(t=P(t,"authority")){t=P(t,"epsg");return t&&-1<I.indexOf(t)}}(i))return A["EPSG:3857"];var e=function(t){if(t=P(t,"extension"))return P(t,"proj4")}(i);return e?n(e):i}return"+"===t[0]?n(t):void 0;var s}function B(t,i){var e,s;if(t=t||{},!i)return t;for(s in i)void 0!==(e=i[s])&&(t[s]=e);return t}function N(t,i,e){return i*=t,e/Math.sqrt(1-i*i)}function R(t,i,e){return e*=t,e=Math.pow((1-e)/(1+e),.5*t),Math.tan(.5*(g-i))/e}function j(t,i){for(var e,s=.5*t,n=g-2*Math.atan(i),o=0;o<=15;o++)if(e=t*Math.sin(n),n+=e=g-2*Math.atan(i*Math.pow((1-e)/(1+e),s))-n,Math.abs(e)<=1e-10)return n;return-9999}var D=function(t){return t<0?-1:1},q=function(t){return Math.abs(t)<=c?t:t-D(t)*e};function t(t){return t}var G=[{init:function(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=N(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function(t){var i,e,s=t.x,n=t.y;return 90<n*o&&n*o<-90&&180<s*o&&s*o<-180||Math.abs(Math.abs(n)-g)<=x?null:(e=this.sphere?(i=this.x0+this.a*this.k0*q(s-this.long0),this.y0+this.a*this.k0*Math.log(Math.tan(w+.5*n))):(e=Math.sin(n),e=R(this.e,n,e),i=this.x0+this.a*this.k0*q(s-this.long0),this.y0-this.a*this.k0*Math.log(e)),t.x=i,t.y=e,t)},inverse:function(t){var i=t.x-this.x0,e=t.y-this.y0;if(this.sphere)s=g-2*Math.atan(Math.exp(-e/(this.a*this.k0)));else{var s,e=Math.exp(-e/(this.a*this.k0));if(-9999===(s=j(this.e,e)))return null}return i=q(this.long0+i/(this.a*this.k0)),t.x=i,t.y=s,t},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]},{init:function(){},forward:t,inverse:t,names:["longlat","identity"]}],F={},H=[];function U(t,i){var e=H.length;return t.names?((H[e]=t).names.forEach(function(t){F[t.toLowerCase()]=e}),this):(console.log(i),!0)}var W={start:function(){G.forEach(U)},add:U,get:function(t){return!!t&&(t=t.toLowerCase(),void 0!==F[t]&&H[F[t]]?H[F[t]]:void 0)}},V={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},K=V.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};V.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var X={};function J(t,i){if(!(this instanceof J))return new J(t);i=i||function(t){if(t)throw t};var e,s,n,o,a,r,h,l,c,u,d=Z(t);"object"==typeof d&&(e=J.projections.get(d.projName))?(!d.datumCode||"none"===d.datumCode||(h=P(X,d.datumCode))&&(d.datum_params=h.towgs84?h.towgs84.split(","):null,d.ellps=h.ellipse,d.datumName=h.datumName||d.datumCode),d.k0=d.k0||1,d.axis=d.axis||"enu",d.ellps=d.ellps||"wgs84",l=d.a,c=d.b,r=d.rf,o=d.ellps,n=d.sphere,l||(l=(o=(o=P(V,o))||K).a,c=o.b,r=o.rf),r&&!c&&(c=(1-1/r)*l),(0===r||Math.abs(l-c)<x)&&(n=!0,c=l),a=(s={a:l,b:c,rf:r,sphere:n}).a,h=s.b,o=d.R_A,r=((l=a*a)-(c=h*h))/l,h=0,o?(l=(a*=1-r*(v+r*(y+r*M)))*a,r=0):h=Math.sqrt(r),n={es:r,e:h,ep2:(l-c)/c},u=d.datum||(o=d.datumCode,a=d.datum_params,r=s.a,h=s.b,l=n.es,c=n.ep2,(u={}).datum_type=void 0===o||"none"===o?f:m,a&&(u.datum_params=a.map(parseFloat),0===u.datum_params[0]&&0===u.datum_params[1]&&0===u.datum_params[2]||(u.datum_type=_),3<u.datum_params.length&&(0===u.datum_params[3]&&0===u.datum_params[4]&&0===u.datum_params[5]&&0===u.datum_params[6]||(u.datum_type=p,u.datum_params[3]*=b,u.datum_params[4]*=b,u.datum_params[5]*=b,u.datum_params[6]=u.datum_params[6]/1e6+1))),u.a=r,u.b=h,u.es=l,u.ep2=c,u),B(this,d),B(this,e),this.a=s.a,this.b=s.b,this.rf=s.rf,this.sphere=s.sphere,this.es=n.es,this.e=n.e,this.ep2=n.ep2,this.datum=u,this.init(),i(null,this)):i(t)}function Q(t,i,e){var s=t.x,n=t.y,o=t.z||0;if(n<-g&&-1.001*g<n)n=-g;else if(g<n&&n<1.001*g)n=g;else{if(n<-g)return{x:-1/0,y:-1/0,z:t.z};if(g<n)return{x:1/0,y:1/0,z:t.z}}return s>Math.PI&&(s-=2*Math.PI),t=Math.sin(n),n=Math.cos(n),{x:((e=e/Math.sqrt(1-i*(t*t)))+o)*n*Math.cos(s),y:(e+o)*n*Math.sin(s),z:(e*(1-i)+o)*t}}function Y(t,i,e,s){var n,o,a,r,h,l,c,u,d,_,p,m=1e-12,f=t.x,g=t.y,v=t.z||0,y=Math.sqrt(f*f+g*g),M=Math.sqrt(f*f+g*g+v*v);if(y/e<m){if(_=0,M/e<m)return p=-s,{x:t.x,y:t.y,z:t.z}}else _=Math.atan2(g,f);for(n=v/M,r=(o=y/M)*(1-i)*(a=1/Math.sqrt(1-i*(2-i)*o*o)),h=n*a,d=0;d++,u=i*(u=e/Math.sqrt(1-i*h*h))/(u+(p=y*r+v*h-u*(1-i*h*h))),u=(c=n*(a=1/Math.sqrt(1-u*(2-u)*o*o)))*r-(l=o*(1-u)*a)*h,r=l,h=c,1e-24<u*u&&d<30;);return{x:_,y:Math.atan(c/Math.abs(l)),z:p}}function $(t){return t===_||t===p}X.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},X.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},X.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},X.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},X.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},X.potsdam={towgs84:"606.0,23.0,413.0",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},X.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},X.hermannskogel={towgs84:"653.0,-212.0,449.0",ellipse:"bessel",datumName:"Hermannskogel"},X.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},X.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},X.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},X.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},X.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},X.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},X.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},X.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},X.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"},(J.projections=W).start();function tt(t,i,e){return n=i,((s=t).datum_type!==n.datum_type||s.a!==n.a||5e-11<Math.abs(s.es-n.es)||(s.datum_type===_?s.datum_params[0]!==n.datum_params[0]||s.datum_params[1]!==n.datum_params[1]||s.datum_params[2]!==n.datum_params[2]:s.datum_type===p&&(s.datum_params[0]!==n.datum_params[0]||s.datum_params[1]!==n.datum_params[1]||s.datum_params[2]!==n.datum_params[2]||s.datum_params[3]!==n.datum_params[3]||s.datum_params[4]!==n.datum_params[4]||s.datum_params[5]!==n.datum_params[5]||s.datum_params[6]!==n.datum_params[6])))&&t.datum_type!==f&&i.datum_type!==f&&(t.es!==i.es||t.a!==i.a||$(t.datum_type)||$(i.datum_type))?(e=Q(e,t.es,t.a),$(t.datum_type)&&(e=function(t,i,e){if(i===_)return{x:t.x+e[0],y:t.y+e[1],z:t.z+e[2]};if(i===p){var s=e[0],n=e[1],o=e[2],a=e[3],r=e[4],i=e[5],e=e[6];return{x:e*(t.x-i*t.y+r*t.z)+s,y:e*(i*t.x+t.y-a*t.z)+n,z:e*(-r*t.x+a*t.y+t.z)+o}}}(e,t.datum_type,t.datum_params)),Y(e=$(i.datum_type)?function(t,i,e){if(i===_)return{x:t.x-e[0],y:t.y-e[1],z:t.z-e[2]};if(i===p){var s=e[0],n=e[1],o=e[2],a=e[3],r=e[4],i=e[5],e=e[6],s=(t.x-s)/e,n=(t.y-n)/e,e=(t.z-o)/e;return{x:s+i*n-r*e,y:-i*s+n+a*e,z:r*s-a*n+e}}}(e,i.datum_type,i.datum_params):e,i.es,i.a,i.b)):e;var s,n}function it(t,i,e){for(var s,n,o=e.x,a=e.y,r=e.z||0,h={},l=0;l<3;l++)if(!i||2!==l||void 0!==e.z)switch(n=0===l?(s=o,-1!=="ew".indexOf(t.axis[l])?"x":"y"):1===l?(s=a,-1!=="ns".indexOf(t.axis[l])?"y":"x"):(s=r,"z"),t.axis[l]){case"e":case"w":case"n":case"s":h[n]=s;break;case"u":void 0!==e[n]&&(h.z=s);break;case"d":void 0!==e[n]&&(h.z=-s);break;default:return null}return h}function et(t){var i={x:t[0],y:t[1]};return 2<t.length&&(i.z=t[2]),3<t.length&&(i.m=t[3]),i}function st(t){nt(t.x),nt(t.y)}function nt(t){if("function"==typeof Number.isFinite){if(Number.isFinite(t))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof t||t!=t||!isFinite(t))throw new TypeError("coordinates must be finite numbers")}function ot(t,i,e){var s,n;if(Array.isArray(e)&&(e=et(e)),st(e),t.datum&&i.datum&&(n=i,((s=t).datum.datum_type===_||s.datum.datum_type===p)&&"WGS84"!==n.datumCode||(n.datum.datum_type===_||n.datum.datum_type===p)&&"WGS84"!==s.datumCode)&&(e=ot(t,s=new J("WGS84"),e),t=s),"enu"!==t.axis&&(e=it(t,!1,e)),"longlat"===t.projName)e={x:e.x*r,y:e.y*r,z:e.z||0};else if(t.to_meter&&(e={x:e.x*t.to_meter,y:e.y*t.to_meter,z:e.z||0}),!(e=t.inverse(e)))return;return t.from_greenwich&&(e.x+=t.from_greenwich),e=tt(t.datum,i.datum,e),i.from_greenwich&&(e={x:e.x-i.from_greenwich,y:e.y,z:e.z||0}),"longlat"===i.projName?e={x:e.x*o,y:e.y*o,z:e.z||0}:(e=i.forward(e),i.to_meter&&(e={x:e.x/i.to_meter,y:e.y/i.to_meter,z:e.z||0})),"enu"!==i.axis?it(i,!0,e):e}var at=J("WGS84");function rt(i,e,s){var n,t;return Array.isArray(s)?(t=ot(i,e,s)||{x:NaN,y:NaN},2<s.length?void 0!==i.name&&"geocent"===i.name||void 0!==e.name&&"geocent"===e.name?("number"==typeof t.z?[t.x,t.y,t.z]:[t.x,t.y,s[2]]).concat(s.splice(3)):[t.x,t.y].concat(s.splice(2)):[t.x,t.y]):(n=ot(i,e,s),2===(t=Object.keys(s)).length||t.forEach(function(t){if(void 0!==i.name&&"geocent"===i.name||void 0!==e.name&&"geocent"===e.name){if("x"===t||"y"===t||"z"===t)return}else if("x"===t||"y"===t)return;n[t]=s[t]}),n)}function ht(t){return t instanceof J?t:t.oProj||J(t)}function lt(i,e,t){i=ht(i);var s=!1;return void 0===e?(e=i,i=at,s=!0):void 0===e.x&&!Array.isArray(e)||(t=e,e=i,i=at,s=!0),e=ht(e),t?rt(i,e,t):(t={forward:function(t){return rt(i,e,t)},inverse:function(t){return rt(e,i,t)}},s&&(t.oProj=e),t)}var ct=6,ut="AJSAJS",dt="AFAFAF",_t=65,pt=73,mt=79,ft=86,gt=90,vt={forward:yt,inverse:function(t){t=bt(Lt(t.toUpperCase()));if(t.lat&&t.lon)return[t.lon,t.lat,t.lon,t.lat];return[t.left,t.bottom,t.right,t.top]},toPoint:Mt};function yt(t,i){return i=i||5,e=function(t){var i,e,s,n,o=t.lat,a=t.lon,r=.00669438,h=xt(o),l=xt(a);n=Math.floor((a+180)/6)+1,180===a&&(n=60);56<=o&&o<64&&3<=a&&a<12&&(n=32);72<=o&&o<84&&(0<=a&&a<9?n=31:9<=a&&a<21?n=33:21<=a&&a<33?n=35:33<=a&&a<42&&(n=37));s=xt(6*(n-1)-180+3),i=r/(1-r),e=6378137/Math.sqrt(1-r*Math.sin(h)*Math.sin(h)),t=Math.tan(h)*Math.tan(h),a=i*Math.cos(h)*Math.cos(h),l=Math.cos(h)*(l-s),s=6378137*(.9983242984503243*h-.002514607064228144*Math.sin(2*h)+2639046602129982e-21*Math.sin(4*h)-35*r*r*r/3072*Math.sin(6*h));r=.9996*e*(l+(1-t+a)*l*l*l/6+(5-18*t+t*t+72*a-58*i)*l*l*l*l*l/120)+5e5,l=.9996*(s+e*Math.tan(h)*(l*l/2+(5-t+9*a+4*a*a)*l*l*l*l/24+(61-58*t+t*t+600*a-330*i)*l*l*l*l*l*l/720));o<0&&(l+=1e7);return{northing:Math.round(l),easting:Math.round(r),zoneNumber:n,zoneLetter:function(t){var i="Z";t<=84&&72<=t?i="X":t<72&&64<=t?i="W":t<64&&56<=t?i="V":t<56&&48<=t?i="U":t<48&&40<=t?i="T":t<40&&32<=t?i="S":t<32&&24<=t?i="R":t<24&&16<=t?i="Q":t<16&&8<=t?i="P":t<8&&0<=t?i="N":t<0&&-8<=t?i="M":t<-8&&-16<=t?i="L":t<-16&&-24<=t?i="K":t<-24&&-32<=t?i="J":t<-32&&-40<=t?i="H":t<-40&&-48<=t?i="G":t<-48&&-56<=t?i="F":t<-56&&-64<=t?i="E":t<-64&&-72<=t?i="D":t<-72&&-80<=t&&(i="C");return i}(o)}}({lat:t[1],lon:t[0]}),s=i,t="00000"+e.easting,i="00000"+e.northing,e.zoneNumber+e.zoneLetter+function(t,i,e){e=Pt(e),t=Math.floor(t/1e5),i=Math.floor(i/1e5)%20;return function(t,i,e){var s=e-1,n=ut.charCodeAt(s),e=dt.charCodeAt(s),s=n+t-1,t=e+i,i=!1;gt<s&&(s=s-gt+_t-1,i=!0);(s===pt||n<pt&&pt<s||(pt<s||n<pt)&&i)&&s++;(s===mt||n<mt&&mt<s||(mt<s||n<mt)&&i)&&++s===pt&&s++;gt<s&&(s=s-gt+_t-1);i=ft<t&&(t=t-ft+_t-1,!0);(t===pt||e<pt&&pt<t||(pt<t||e<pt)&&i)&&t++;(t===mt||e<mt&&mt<t||(mt<t||e<mt)&&i)&&++t===pt&&t++;ft<t&&(t=t-ft+_t-1);return String.fromCharCode(s)+String.fromCharCode(t)}(t,i,e)}(e.easting,e.northing,e.zoneNumber)+t.substr(t.length-5,s)+i.substr(i.length-5,s);var e,s}function Mt(t){t=bt(Lt(t.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function xt(t){return t*(Math.PI/180)}function wt(t){return t/Math.PI*180}function bt(t){var i=t.northing,e=t.easting,s=t.zoneLetter,n=t.zoneNumber;if(n<0||60<n)return null;var o=6378137,a=.00669438,r=(1-Math.sqrt(1-a))/(1+Math.sqrt(1-a)),h=e-5e5,l=i;s<"N"&&(l-=1e7);var e=6*(n-1)-180+3,i=a/(1-a),n=(s=l/.9996/6367449.145945056)+(3*r/2-27*r*r*r/32)*Math.sin(2*s)+(21*r*r/16-55*r*r*r*r/32)*Math.sin(4*s)+151*r*r*r/96*Math.sin(6*s),l=o/Math.sqrt(1-a*Math.sin(n)*Math.sin(n)),r=Math.tan(n)*Math.tan(n),s=i*Math.cos(n)*Math.cos(n),a=o*(1-a)/Math.pow(1-a*Math.sin(n)*Math.sin(n),1.5),h=h/(.9996*l),a=wt(a=n-l*Math.tan(n)/a*(h*h/2-(5+3*r+10*s-4*s*s-9*i)*h*h*h*h/24+(61+90*r+298*s+45*r*r-252*i-3*s*s)*h*h*h*h*h*h/720)),n=e+wt(n=(h-(1+2*r+s)*h*h*h/6+(5-2*s+28*r-3*s*s+8*i+24*r*r)*h*h*h*h*h/120)/Math.cos(n));return t.accuracy?{top:(t=bt({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber})).lat,right:t.lon,bottom:a,left:n}:{lat:a,lon:n}}function Pt(t){t%=ct;return t=0===t?ct:t}function Lt(t){if(t&&0===t.length)throw"MGRSPoint coverting from nothing";for(var i,e=t.length,s=null,n="",o=0;!/[A-Z]/.test(i=t.charAt(o));){if(2<=o)throw"MGRSPoint bad conversion from: "+t;n+=i,o++}var a=parseInt(n,10);if(0===o||e<o+3)throw"MGRSPoint bad conversion from: "+t;var r=t.charAt(o++);if(r<="A"||"B"===r||"Y"===r||"Z"<=r||"I"===r||"O"===r)throw"MGRSPoint zone letter "+r+" not handled: "+t;for(var s=t.substring(o,o+=2),h=Pt(a),l=function(t,i){var e=ut.charCodeAt(i-1),s=1e5,n=!1;for(;e!==t.charCodeAt(0);){if(++e===pt&&e++,e===mt&&e++,gt<e){if(n)throw"Bad character: "+t;e=_t,n=!0}s+=1e5}return s}(s.charAt(0),h),c=function(t,i){if("V"<t)throw"MGRSPoint given invalid Northing "+t;var e=dt.charCodeAt(i-1),s=0,n=!1;for(;e!==t.charCodeAt(0);){if(++e===pt&&e++,e===mt&&e++,ft<e){if(n)throw"Bad character: "+t;e=_t,n=!0}s+=1e5}return s}(s.charAt(1),h);c<function(t){var i;switch(t){case"C":i=11e5;break;case"D":i=2e6;break;case"E":i=28e5;break;case"F":i=37e5;break;case"G":i=46e5;break;case"H":i=55e5;break;case"J":i=64e5;break;case"K":i=73e5;break;case"L":i=82e5;break;case"M":i=91e5;break;case"N":i=0;break;case"P":i=8e5;break;case"Q":i=17e5;break;case"R":i=26e5;break;case"S":i=35e5;break;case"T":i=44e5;break;case"U":i=53e5;break;case"V":i=62e5;break;case"W":i=7e6;break;case"X":i=79e5;break;default:i=-1}{if(0<=i)return i;throw"Invalid zone letter: "+t}}(r);)c+=2e6;var u=e-o;if(u%2!=0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+t;var d,s=u/2,h=0,e=0;return 0<s&&(d=1e5/Math.pow(10,s),u=t.substring(o,o+s),h=parseFloat(u)*d,s=t.substring(o+s),e=parseFloat(s)*d),{easting:h+l,northing:e+c,zoneLetter:r,zoneNumber:a,accuracy:d}}function Ct(t,i,e){if(!(this instanceof Ct))return new Ct(t,i,e);var s;Array.isArray(t)?(this.x=t[0],this.y=t[1],this.z=t[2]||0):"object"==typeof t?(this.x=t.x,this.y=t.y,this.z=t.z||0):"string"==typeof t&&void 0===i?(s=t.split(","),this.x=parseFloat(s[0],10),this.y=parseFloat(s[1],10),this.z=parseFloat(s[2],10)||0):(this.x=t,this.y=i,this.z=e||0),console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Ct.fromMGRS=function(t){return new Ct(Mt(t))},Ct.prototype.toMGRS=function(t){return yt([this.x,this.y],t)};function Tt(t){var i=[];i[0]=Et-t*(kt+t*(zt+t*(At+t*Ot))),i[1]=t*(It-t*(zt+t*(At+t*Ot)));var e=t*t;return i[2]=e*(Zt-t*(Bt+t*Nt)),i[3]=(e*=t)*(Rt-t*jt),i[4]=e*t*Dt,i}function St(t,i,e){for(var s=1/(1-i),n=t,o=Gt;o;--o){var a=Math.sin(n),r=1-i*a*a;if(n-=r=(qt(n,a,Math.cos(n),e)-t)*(r*Math.sqrt(r))*s,Math.abs(r)<x)return n}return n}var Et=1,kt=.25,zt=.046875,At=.01953125,Ot=.01068115234375,It=.75,Zt=.46875,Bt=.013020833333333334,Nt=.007120768229166667,Rt=.3645833333333333,jt=.005696614583333333,Dt=.3076171875,qt=function(t,i,e,s){return s[0]*t-(e*=i)*(s[1]+(i*=i)*(s[2]+i*(s[3]+i*s[4])))},Gt=20;function Ft(t,i){for(var e,s=2*Math.cos(2*i),n=t.length-1,o=t[n],a=0;0<=--n;)e=s*o-a+t[n],a=o,o=e;return i+e*Math.sin(2*i)}function Ht(t,i,e){for(var s,n,o=Math.sin(i),a=Math.cos(i),i=Wt(e),e=Xt(e),r=2*a*e,h=-2*o*i,l=t.length-1,c=t[l],u=0,d=0,_=0;0<=--l;)s=d,n=u,c=r*(d=c)-s-h*(u=_)+t[l],_=h*d-n+r*u;return[(r=o*e)*c-(h=a*i)*_,r*_+h*c]}var Ut={init:function(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=Tt(this.es),this.ml0=qt(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))},forward:function(t){var i=t.x,e=t.y,s=q(i-this.long0),n=Math.sin(e),o=Math.cos(e);if(this.es){var a=o*s,r=Math.pow(a,2),h=this.ep2*Math.pow(o,2),l=Math.pow(h,2),i=Math.abs(o)>x?Math.tan(e):0,c=Math.pow(i,2),u=Math.pow(c,2),d=1-this.es*Math.pow(n,2);a/=Math.sqrt(d);i=qt(e,n,o,this.en),d=this.a*(this.k0*a*(1+r/6*(1-c+h+r/20*(5-18*c+u+14*h-58*c*h+r/42*(61+179*u-u*c-479*c)))))+this.x0,u=this.a*(this.k0*(i-this.ml0+n*s*a/2*(1+r/12*(5-c+9*h+4*l+r/30*(61+u-58*c+270*h-330*c*h+r/56*(1385+543*u-u*c-3111*c))))))+this.y0}else{c=o*Math.sin(s);if(Math.abs(Math.abs(c)-1)<x)return 93;if(d=.5*this.a*this.k0*Math.log((1+c)/(1-c))+this.x0,u=o*Math.cos(s)/Math.sqrt(1-Math.pow(c,2)),1<=(c=Math.abs(u))){if(x<c-1)return 93;u=0}else u=Math.acos(u);u=this.a*this.k0*((u=e<0?-u:u)-this.lat0)+this.y0}return t.x=d,t.y=u,t},inverse:function(t){var i,e,s,n,o,a,r,h,l,c=(t.x-this.x0)*(1/this.a),u=(t.y-this.y0)*(1/this.a),d=this.es?(h=this.ml0+u/this.k0,i=St(h,this.es,this.en),Math.abs(i)<g?(a=Math.sin(i),e=Math.cos(i),r=Math.abs(e)>x?Math.tan(i):0,s=this.ep2*Math.pow(e,2),l=Math.pow(s,2),n=Math.pow(r,2),o=Math.pow(n,2),h=1-this.es*Math.pow(a,2),a=c*Math.sqrt(h)/this.k0,l=i-(h*=r)*(r=Math.pow(a,2))/(1-this.es)*.5*(1-r/12*(5+3*n-9*s*n+s-4*l-r/30*(61+90*n-252*s*n+45*o+46*s-r/56*(1385+3633*n+4095*o+1574*o*n)))),q(this.long0+a*(1-r/6*(1+2*n+s-r/20*(5+28*n+24*o+8*s*n+6*s-r/42*(61+662*n+1320*o+720*o*n))))/e)):(l=g*D(u),0)):(c=.5*((d=Math.exp(c/this.k0))-1/d),d=this.lat0+u/this.k0,d=Math.cos(d),h=Math.sqrt((1-Math.pow(d,2))/(1+Math.pow(c,2))),l=Math.asin(h),u<0&&(l=-l),0==c&&0===d?0:q(Math.atan2(c,d)+this.long0));return t.x=d,t.y=l,t},names:["Transverse_Mercator","Transverse Mercator","tmerc"]},Wt=function(t){var t=Math.exp(t);return t=(t-1/t)/2},Vt=function(t,i){t=Math.abs(t),i=Math.abs(i);var e=Math.max(t,i),i=Math.min(t,i)/(e||1);return e*Math.sqrt(1+Math.pow(i,2))},Kt=function(t){var i=1+t,e=i-1;return 0==e?t:t*Math.log(i)/e},Xt=function(t){var t=Math.exp(t);return t=(t+1/t)/2};var Jt={init:function(){if(void 0===this.es||this.es<=0)throw new Error("incorrect elliptical usage");this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=(i=this.es/(1+Math.sqrt(1-this.es)))/(2-i),i=t;this.cgb[0]=t*(2+t*(-2/3+t*(t*(116/45+t*(26/45+-2854/675*t))-2))),this.cbg[0]=t*(t*(2/3+t*(4/3+t*(-82/45+t*(32/45+4642/4725*t))))-2),this.cgb[1]=(i*=t)*(7/3+t*(t*(-227/45+t*(2704/315+2323/945*t))-1.6)),this.cbg[1]=i*(5/3+t*(-16/15+t*(-13/9+t*(904/315+-1522/945*t)))),this.cgb[2]=(i*=t)*(56/15+t*(-136/35+t*(-1262/105+73814/2835*t))),this.cbg[2]=i*(-26/15+t*(34/21+t*(1.6+-12686/2835*t))),this.cgb[3]=(i*=t)*(4279/630+t*(-332/35+-399572/14175*t)),this.cbg[3]=i*(1237/630+t*(-24832/14175*t-2.4)),this.cgb[4]=(i*=t)*(4174/315+-144838/6237*t),this.cbg[4]=i*(-734/315+109598/31185*t),this.cgb[5]=601676/22275*(i*=t),this.cbg[5]=444337/155925*i,i=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+i*(.25+i*(1/64+i/256))),this.utg[0]=t*(t*(2/3+t*(-37/96+t*(1/360+t*(81/512+-96199/604800*t))))-.5),this.gtu[0]=t*(.5+t*(-2/3+t*(5/16+t*(41/180+t*(-127/288+7891/37800*t))))),this.utg[1]=i*(-1/48+t*(-1/15+t*(437/1440+t*(-46/105+1118711/3870720*t)))),this.gtu[1]=i*(13/48+t*(t*(557/1440+t*(281/630+-1983433/1935360*t))-.6)),this.utg[2]=(i*=t)*(-17/480+t*(37/840+t*(209/4480+-5569/90720*t))),this.gtu[2]=i*(61/240+t*(-103/140+t*(15061/26880+167603/181440*t))),this.utg[3]=(i*=t)*(-4397/161280+t*(11/504+830251/7257600*t)),this.gtu[3]=i*(49561/161280+t*(-179/168+6601661/7257600*t)),this.utg[4]=(i*=t)*(-4583/161280+108847/3991680*t),this.gtu[4]=i*(34729/80640+-3418889/1995840*t),this.utg[5]=-.03233083094085698*(i*=t),this.gtu[5]=.6650675310896665*i,i=Ft(this.cbg,this.lat0),this.Zb=-this.Qn*(i+function(t,i){for(var e,s=2*Math.cos(i),n=t.length-1,o=t[n],a=0;0<=--n;)e=s*o-a+t[n],a=o,o=e;return Math.sin(i)*e}(this.gtu,2*i))},forward:function(t){var i=q(t.x-this.long0),e=t.y,e=Ft(this.cbg,e),s=Math.sin(e),n=Math.cos(e),o=Math.sin(i),a=Math.cos(i);e=Math.atan2(s,a*n),i=Math.atan2(o*n,Vt(s,n*a)),n=Math.tan(i),a=Math.abs(n),a=Kt(a*(1+a/(Vt(1,a)+1)));var r,a=Ht(this.gtu,2*e,2*(i=n<0?-a:a));return e+=a[0],i+=a[1],e=Math.abs(i)<=2.623395162778?(r=this.a*(this.Qn*i)+this.x0,this.a*(this.Qn*e+this.Zb)+this.y0):r=1/0,t.x=r,t.y=e,t},inverse:function(t){var i,e,s,n,o=(t.x-this.x0)*(1/this.a),a=(t.y-this.y0)*(1/this.a);return a=(a-this.Zb)/this.Qn,o/=this.Qn,a=Math.abs(o)<=2.623395162778?(a+=(n=Ht(this.utg,2*a,2*o))[0],o+=n[1],o=Math.atan(Wt(o)),i=Math.sin(a),e=Math.cos(a),s=Math.sin(o),n=Math.cos(o),a=Math.atan2(i*n,Vt(s,n*e)),o=Math.atan2(s,n*e),e=q(o+this.long0),Ft(this.cgb,a)):e=1/0,t.x=e,t.y=a,t},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc"]};function Qt(t,i){return Math.pow((1-t)/(1+t),i)}var Yt={init:function(){var t=function(t,i){if(void 0===t){if((t=Math.floor(30*(q(i)+Math.PI)/Math.PI)+1)<0)return 0;if(60<t)return 60}return t}(this.zone,this.long0);if(void 0===t)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*r,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,Jt.init.apply(this),this.forward=Jt.forward,this.inverse=Jt.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"};var $t={init:function(){var t=Math.sin(this.lat0),i=Math.cos(this.lat0);i*=i,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*i*i/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+w)/(Math.pow(Math.tan(.5*this.lat0+w),this.C)*Qt(this.e*t,this.ratexp))},forward:function(t){var i=t.x,e=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*e+w),this.C)*Qt(this.e*Math.sin(e),this.ratexp))-g,t.x=this.C*i,t},inverse:function(t){for(var i=t.x/this.C,e=t.y,s=Math.pow(Math.tan(.5*e+w)/this.K,1/this.C),n=20;0<n&&(e=2*Math.atan(s*Qt(this.e*Math.sin(t.y),-.5*this.e))-g,!(Math.abs(e-t.y)<1e-14));--n)t.y=e;return n?(t.x=i,t.y=e,t):null},names:["gauss"]};var ti={init:function(){$t.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(t){var i,e,s,n;return t.x=q(t.x-this.long0),$t.forward.apply(this,[t]),i=Math.sin(t.y),e=Math.cos(t.y),s=Math.cos(t.x),n=this.k0*this.R2/(1+this.sinc0*i+this.cosc0*e*s),t.x=n*e*Math.sin(t.x),t.y=n*(this.cosc0*i-this.sinc0*e*s),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){var i,e,s,n;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,n=(i=Math.sqrt(t.x*t.x+t.y*t.y))?(s=2*Math.atan2(i,this.R2),n=Math.sin(s),e=Math.cos(s),s=Math.asin(e*this.sinc0+t.y*n*this.cosc0/i),Math.atan2(t.x*n,i*this.cosc0*e-t.y*this.sinc0*n)):(s=this.phic0,0),t.x=n,t.y=s,$t.inverse.apply(this,[t]),t.x=q(t.x+this.long0),t},names:["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]};var ii={init:function(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=x&&(this.k0=.5*(1+D(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=x&&(0<this.lat0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=x&&(this.k0=.5*this.cons*N(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/R(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=N(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-g,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(t){var i,e,s=t.x,n=t.y,o=Math.sin(n),a=Math.cos(n),r=q(s-this.long0);return Math.abs(Math.abs(s-this.long0)-Math.PI)<=x&&Math.abs(n+this.lat0)<=x?(t.x=NaN,t.y=NaN,t):this.sphere?(i=2*this.k0/(1+this.sinlat0*o+this.coslat0*a*Math.cos(r)),t.x=this.a*i*a*Math.sin(r)+this.x0,t.y=this.a*i*(this.coslat0*o-this.sinlat0*a*Math.cos(r))+this.y0,t):(e=2*Math.atan(this.ssfn_(n,o,this.e))-g,a=Math.cos(e),e=Math.sin(e),Math.abs(this.coslat0)<=x?(o=R(this.e,n*this.con,this.con*o),o=2*this.a*this.k0*o/this.cons,t.x=this.x0+o*Math.sin(s-this.long0),t.y=this.y0-this.con*o*Math.cos(s-this.long0)):(Math.abs(this.sinlat0)<x?(i=2*this.a*this.k0/(1+a*Math.cos(r)),t.y=i*e):(i=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*e+this.cosX0*a*Math.cos(r))),t.y=i*(this.cosX0*e-this.sinX0*a*Math.cos(r))+this.y0),t.x=i*a*Math.sin(r)+this.x0),t)},inverse:function(t){var i,e;t.x-=this.x0,t.y-=this.y0;var s=Math.sqrt(t.x*t.x+t.y*t.y);if(this.sphere){var n=2*Math.atan(s/(2*this.a*this.k0)),o=this.long0,a=this.lat0;return s<=x?(t.x=o,t.y=a,t):(a=Math.asin(Math.cos(n)*this.sinlat0+t.y*Math.sin(n)*this.coslat0/s),o=Math.abs(this.coslat0)<x?0<this.lat0?q(this.long0+Math.atan2(t.x,-1*t.y)):q(this.long0+Math.atan2(t.x,t.y)):q(this.long0+Math.atan2(t.x*Math.sin(n),s*this.coslat0*Math.cos(n)-t.y*this.sinlat0*Math.sin(n))),t.x=o,t.y=a,t)}if(Math.abs(this.coslat0)<=x){if(s<=x)return a=this.lat0,o=this.long0,t.x=o,t.y=a,t;t.x*=this.con,t.y*=this.con,i=s*this.cons/(2*this.a*this.k0),a=this.con*j(this.e,i),o=this.con*q(this.con*this.long0+Math.atan2(t.x,-1*t.y))}else i=2*Math.atan(s*this.cosX0/(2*this.a*this.k0*this.ms1)),o=this.long0,s<=x?e=this.X0:(e=Math.asin(Math.cos(i)*this.sinX0+t.y*Math.sin(i)*this.cosX0/s),o=q(this.long0+Math.atan2(t.x*Math.sin(i),s*this.cosX0*Math.cos(i)-t.y*this.sinX0*Math.sin(i)))),a=-1*j(this.e,Math.tan(.5*(g+e)));return t.x=o,t.y=a,t},names:["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],ssfn_:function(t,i,e){return i*=e,Math.tan(.5*(g+t))*Math.pow((1-i)/(1+i),.5*e)}};var ei={init:function(){var t=this.lat0;this.lambda0=this.long0;var i=Math.sin(t),e=this.a,s=2*(n=1/this.rf)-Math.pow(n,2),n=this.e=Math.sqrt(s);this.R=this.k0*e*Math.sqrt(1-s)/(1-s*Math.pow(i,2)),this.alpha=Math.sqrt(1+s/(1-s)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(i/this.alpha),s=Math.log(Math.tan(Math.PI/4+this.b0/2)),t=Math.log(Math.tan(Math.PI/4+t/2)),i=Math.log((1+n*i)/(1-n*i)),this.K=s-this.alpha*t+this.alpha*n/2*i},forward:function(t){var i=Math.log(Math.tan(Math.PI/4-t.y/2)),e=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),s=-this.alpha*(i+e)+this.K,i=2*(Math.atan(Math.exp(s))-Math.PI/4),e=this.alpha*(t.x-this.lambda0),s=Math.atan(Math.sin(e)/(Math.sin(this.b0)*Math.tan(i)+Math.cos(this.b0)*Math.cos(e))),e=Math.asin(Math.cos(this.b0)*Math.sin(i)-Math.sin(this.b0)*Math.cos(i)*Math.cos(e));return t.y=this.R/2*Math.log((1+Math.sin(e))/(1-Math.sin(e)))+this.y0,t.x=this.R*s+this.x0,t},inverse:function(t){for(var i,e=t.x-this.x0,s=t.y-this.y0,e=e/this.R,s=2*(Math.atan(Math.exp(s/this.R))-Math.PI/4),n=Math.asin(Math.cos(this.b0)*Math.sin(s)+Math.sin(this.b0)*Math.cos(s)*Math.cos(e)),s=Math.atan(Math.sin(e)/(Math.cos(this.b0)*Math.cos(e)-Math.sin(this.b0)*Math.tan(s))),s=this.lambda0+s/this.alpha,o=n,a=-1e3,r=0;1e-7<Math.abs(o-a);){if(20<++r)return;i=1/this.alpha*(Math.log(Math.tan(Math.PI/4+n/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(o))/2)),a=o,o=2*Math.atan(Math.exp(i))-Math.PI/2}return t.x=s,t.y=o,t},names:["somerc"]};var si={init:function(){this.no_off=this.no_off||!1,this.no_rot=this.no_rot||!1,isNaN(this.k0)&&(this.k0=1);var t=Math.sin(this.lat0),i=Math.cos(this.lat0),e=this.e*t;this.bl=Math.sqrt(1+this.es/(1-this.es)*Math.pow(i,4)),this.al=this.a*this.bl*this.k0*Math.sqrt(1-this.es)/(1-e*e);var s,n,o=R(this.e,this.lat0,t),a=this.bl/i*Math.sqrt((1-this.es)/(1-e*e));a*a<1&&(a=1),isNaN(this.longc)?(n=R(this.e,this.lat1,Math.sin(this.lat1)),t=R(this.e,this.lat2,Math.sin(this.lat2)),0<=this.lat0?this.el=(a+Math.sqrt(a*a-1))*Math.pow(o,this.bl):this.el=(a-Math.sqrt(a*a-1))*Math.pow(o,this.bl),i=Math.pow(n,this.bl),e=Math.pow(t,this.bl),n=.5*((s=this.el/i)-1/s),t=(this.el*this.el-e*i)/(this.el*this.el+e*i),e=(e-i)/(e+i),i=q(this.long1-this.long2),this.long0=.5*(this.long1+this.long2)-Math.atan(t*Math.tan(.5*this.bl*i)/e)/this.bl,this.long0=q(this.long0),e=q(this.long1-this.long0),this.gamma0=Math.atan(Math.sin(this.bl*e)/n),this.alpha=Math.asin(a*Math.sin(this.gamma0))):(s=0<=this.lat0?a+Math.sqrt(a*a-1):a-Math.sqrt(a*a-1),this.el=s*Math.pow(o,this.bl),n=.5*(s-1/s),this.gamma0=Math.asin(Math.sin(this.alpha)/a),this.long0=this.longc-Math.asin(n*Math.tan(this.gamma0))/this.bl),this.no_off?this.uc=0:0<=this.lat0?this.uc=this.al/this.bl*Math.atan2(Math.sqrt(a*a-1),Math.cos(this.alpha)):this.uc=-1*this.al/this.bl*Math.atan2(Math.sqrt(a*a-1),Math.cos(this.alpha))},forward:function(t){var i,e,s=t.x,n=t.y,o=q(s-this.long0);return o=Math.abs(Math.abs(n)-g)<=x?(i=0<n?-1:1,e=this.al/this.bl*Math.log(Math.tan(w+i*this.gamma0*.5)),-1*i*g*this.al/this.bl):(s=R(this.e,n,Math.sin(n)),n=.5*((i=this.el/Math.pow(s,this.bl))-1/i),s=.5*(i+1/i),i=Math.sin(this.bl*o),s=(n*Math.sin(this.gamma0)-i*Math.cos(this.gamma0))/s,e=Math.abs(Math.abs(s)-1)<=x?Number.POSITIVE_INFINITY:.5*this.al*Math.log((1-s)/(1+s))/this.bl,Math.abs(Math.cos(this.bl*o))<=x?this.al*this.bl*o:this.al*Math.atan2(n*Math.cos(this.gamma0)+i*Math.sin(this.gamma0),Math.cos(this.bl*o))/this.bl),this.no_rot?(t.x=this.x0+o,t.y=this.y0+e):(o-=this.uc,t.x=this.x0+e*Math.cos(this.alpha)+o*Math.sin(this.alpha),t.y=this.y0+o*Math.cos(this.alpha)-e*Math.sin(this.alpha)),t},inverse:function(t){var i;this.no_rot?(n=t.y-this.y0,i=t.x-this.x0):(n=(t.x-this.x0)*Math.cos(this.alpha)-(t.y-this.y0)*Math.sin(this.alpha),i=(t.y-this.y0)*Math.cos(this.alpha)+(t.x-this.x0)*Math.sin(this.alpha),i+=this.uc);var e=.5*((o=Math.exp(-1*this.bl*n/this.al))-1/o),s=.5*(o+1/o),n=Math.sin(this.bl*i/this.al),o=(n*Math.cos(this.gamma0)+e*Math.sin(this.gamma0))/s,s=Math.pow(this.el/Math.sqrt((1+o)/(1-o)),1/this.bl);return Math.abs(o-1)<x?(t.x=this.long0,t.y=g):Math.abs(1+o)<x?(t.x=this.long0,t.y=-1*g):(t.y=j(this.e,s),t.x=q(this.long0-Math.atan2(e*Math.cos(this.gamma0)-n*Math.sin(this.gamma0),Math.cos(this.bl*i/this.al))/this.bl)),t},names:["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","omerc"]};var ni={init:function(){var t,i,e,s,n,o;this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,Math.abs(this.lat1+this.lat2)<x||(n=this.b/this.a,this.e=Math.sqrt(1-n*n),t=Math.sin(this.lat1),s=Math.cos(this.lat1),i=N(this.e,t,s),e=R(this.e,this.lat1,t),o=Math.sin(this.lat2),n=Math.cos(this.lat2),s=N(this.e,o,n),n=R(this.e,this.lat2,o),o=R(this.e,this.lat0,Math.sin(this.lat0)),Math.abs(this.lat1-this.lat2)>x?this.ns=Math.log(i/s)/Math.log(e/n):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=i/(this.ns*Math.pow(e,this.ns)),this.rh=this.a*this.f0*Math.pow(o,this.ns),this.title||(this.title="Lambert Conformal Conic"))},forward:function(t){var i=t.x,e=t.y;Math.abs(2*Math.abs(e)-Math.PI)<=x&&(e=D(e)*(g-2*x));var s,n=Math.abs(Math.abs(e)-g);if(x<n)s=R(this.e,e,Math.sin(e)),s=this.a*this.f0*Math.pow(s,this.ns);else{if(e*this.ns<=0)return null;s=0}return i=this.ns*q(i-this.long0),t.x=this.k0*(s*Math.sin(i))+this.x0,t.y=this.k0*(this.rh-s*Math.cos(i))+this.y0,t},inverse:function(t){var i,e,s=(t.x-this.x0)/this.k0,n=this.rh-(t.y-this.y0)/this.k0,o=0<this.ns?(i=Math.sqrt(s*s+n*n),1):(i=-Math.sqrt(s*s+n*n),-1),a=0;if(0!==i&&(a=Math.atan2(o*s,o*n)),0!==i||0<this.ns){if(o=1/this.ns,e=Math.pow(i/(this.a*this.f0),o),-9999===(e=j(this.e,e)))return null}else e=-g;return a=q(a/this.ns+this.long0),t.x=a,t.y=e,t},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_2SP","lcc"]};function oi(t,i,e,s,n){return t*n-i*Math.sin(2*n)+e*Math.sin(4*n)-s*Math.sin(6*n)}function ai(t){return 1-.25*t*(1+t/16*(3+1.25*t))}function ri(t){return.375*t*(1+.25*t*(1+.46875*t))}function hi(t){return.05859375*t*t*(1+.75*t)}function li(t){return t*t*t*(35/3072)}function ci(t,i,e){return e*=i,t/Math.sqrt(1-e*e)}function ui(t){return Math.abs(t)<g?t:t-D(t)*Math.PI}function di(t,i,e,s,n){for(var o,a=t/i,r=0;r<15;r++)if(a+=o=(t-(i*a-e*Math.sin(2*a)+s*Math.sin(4*a)-n*Math.sin(6*a)))/(i-2*e*Math.cos(2*a)+4*s*Math.cos(4*a)-6*n*Math.cos(6*a)),Math.abs(o)<=1e-10)return a;return NaN}var _i={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(t){var i=t.x,e=t.y,s=q(i-this.long0),i=Math.pow((1+this.e*Math.sin(e))/(1-this.e*Math.sin(e)),this.alfa*this.e/2),e=2*(Math.atan(this.k*Math.pow(Math.tan(e/2+this.s45),this.alfa)/i)-this.s45),i=-s*this.alfa,s=Math.asin(Math.cos(this.ad)*Math.sin(e)+Math.sin(this.ad)*Math.cos(e)*Math.cos(i)),i=Math.asin(Math.cos(e)*Math.sin(i)/Math.cos(s)),i=this.n*i,s=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(s/2+this.s45),this.n);return t.y=s*Math.cos(i),t.x=s*Math.sin(i),this.czech||(t.y*=-1,t.x*=-1),t},inverse:function(t){var i,e,s=t.x;t.x=t.y,t.y=s,this.czech||(t.y*=-1,t.x*=-1),e=Math.sqrt(t.x*t.x+t.y*t.y),s=Math.atan2(t.y,t.x)/Math.sin(this.s0),e=2*(Math.atan(Math.pow(this.ro0/e,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),i=Math.asin(Math.cos(this.ad)*Math.sin(e)-Math.sin(this.ad)*Math.cos(e)*Math.cos(s)),s=Math.asin(Math.cos(e)*Math.sin(s)/Math.cos(i)),t.x=this.long0-s/this.alfa;for(var n=i,o=0,a=0;t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(i/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(n))/(1-this.e*Math.sin(n)),this.e/2))-this.s45),Math.abs(n-t.y)<1e-10&&(o=1),n=t.y,a+=1,0===o&&a<15;);return 15<=a?null:t},names:["Krovak","krovak"]};function pi(t,i){var e;return 1e-7<t?(1-t*t)*(i/(1-(e=t*i)*e)-.5/t*Math.log((1-e)/(1+e))):2*i}var mi={init:function(){this.sphere||(this.e0=ai(this.es),this.e1=ri(this.es),this.e2=hi(this.es),this.e3=li(this.es),this.ml0=this.a*oi(this.e0,this.e1,this.e2,this.e3,this.lat0))},forward:function(t){var i,e,s,n,o,a,r=t.x,h=t.y,r=q(r-this.long0);return a=this.sphere?(o=this.a*Math.asin(Math.cos(h)*Math.sin(r)),this.a*(Math.atan2(Math.tan(h),Math.cos(r))-this.lat0)):(i=Math.sin(h),e=Math.cos(h),s=ci(this.a,this.e,i),n=Math.tan(h)*Math.tan(h),o=s*(r=r*Math.cos(h))*(1-(a=r*r)*n*(1/6-(8-n+8*(r=this.es*e*e/(1-this.es)))*a/120)),this.a*oi(this.e0,this.e1,this.e2,this.e3,h)-this.ml0+s*i/e*a*(.5+(5-n+6*r)*a/24)),t.x=o+this.x0,t.y=a+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var i=t.x/this.a,e=t.y/this.a;if(this.sphere)var s=e+this.lat0,n=Math.asin(Math.sin(s)*Math.cos(i)),o=Math.atan2(Math.tan(i),Math.cos(s));else{var a=this.ml0/this.a+e,r=di(a,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(r)-g)<=x)return t.x=this.long0,t.y=g,e<0&&(t.y*=-1),t;var h=ci(this.a,this.e,Math.sin(r)),s=h*h*h/this.a/this.a*(1-this.es),a=Math.pow(Math.tan(r),2),e=i*this.a/h,i=e*e;n=r-h*Math.tan(r)/s*e*e*(.5-(1+3*a)*e*e/24),o=e*(1-i*(a/3+(1+3*a)*a*i/15))/Math.cos(r)}return t.x=q(o+this.long0),t.y=ui(n),t},names:["Cassini","Cassini_Soldner","cass"]};var fi=.3333333333333333,gi=.17222222222222222,vi=.10257936507936508,yi=.06388888888888888,Mi=.0664021164021164,xi=.016415012942191543;function wi(t){return 1<Math.abs(t)&&(t=1<t?1:-1),Math.asin(t)}var bi={init:function(){var t,i,e,s=Math.abs(this.lat0);if(Math.abs(s-g)<x?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(s)<x?this.mode=this.EQUIT:this.mode=this.OBLIQ,0<this.es)switch(this.qp=pi(this.e,1),this.mmf=.5/(1-this.es),this.apa=(i=this.es,(e=[])[0]=i*fi,s=i*i,e[0]+=s*gi,e[1]=s*yi,s*=i,e[0]+=s*vi,e[1]+=s*Mi,e[2]=s*xi,e),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=pi(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(t){var i,e,s,n,o,a,r,h,l,c,u=t.x,d=t.y,u=q(u-this.long0);if(this.sphere){if(o=Math.sin(d),c=Math.cos(d),s=Math.cos(u),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((e=this.mode===this.EQUIT?1+c*s:1+this.sinph0*o+this.cosph0*c*s)<=x)return null;i=(e=Math.sqrt(2/e))*c*Math.sin(u),e*=this.mode===this.EQUIT?o:this.cosph0*o-this.sinph0*c*s}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(s=-s),Math.abs(d+this.lat0)<x)return null;e=w-.5*d,i=(e=2*(this.mode===this.S_POLE?Math.cos(e):Math.sin(e)))*Math.sin(u),e*=s}}else{switch(l=h=r=0,s=Math.cos(u),n=Math.sin(u),o=Math.sin(d),a=pi(this.e,o),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(r=a/this.qp,h=Math.sqrt(1-r*r)),this.mode){case this.OBLIQ:l=1+this.sinb1*r+this.cosb1*h*s;break;case this.EQUIT:l=1+h*s;break;case this.N_POLE:l=g+d,a=this.qp-a;break;case this.S_POLE:l=d-g,a=this.qp+a}if(Math.abs(l)<x)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:l=Math.sqrt(2/l),e=this.mode===this.OBLIQ?this.ymf*l*(this.cosb1*r-this.sinb1*h*s):(l=Math.sqrt(2/(1+h*s)))*r*this.ymf,i=this.xmf*l*h*n;break;case this.N_POLE:case this.S_POLE:0<=a?(i=(l=Math.sqrt(a))*n,e=s*(this.mode===this.S_POLE?l:-l)):i=e=0}}return t.x=this.a*i+this.x0,t.y=this.a*e+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var i,e,s,n,o,a,r=t.x/this.a,h=t.y/this.a;if(this.sphere){var l,c=0,u=0,d=Math.sqrt(r*r+h*h);if(1<(l=.5*d))return null;switch(l=2*Math.asin(l),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(u=Math.sin(l),c=Math.cos(l)),this.mode){case this.EQUIT:l=Math.abs(d)<=x?0:Math.asin(h*u/d),r*=u,h=c*d;break;case this.OBLIQ:l=Math.abs(d)<=x?this.lat0:Math.asin(c*this.sinph0+h*u*this.cosph0/d),r*=u*this.cosph0,h=(c-Math.sin(l)*this.sinph0)*d;break;case this.N_POLE:h=-h,l=g-l;break;case this.S_POLE:l-=g}i=0!==h||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(r,h):0}else{if(a=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(r/=this.dd,h*=this.dd,(s=Math.sqrt(r*r+h*h))<x)return t.x=this.long0,t.y=this.lat0,t;e=2*Math.asin(.5*s/this.rq),n=Math.cos(e),r*=e=Math.sin(e),h=this.mode===this.OBLIQ?(a=n*this.sinb1+h*e*this.cosb1/s,o=this.qp*a,s*this.cosb1*n-h*this.sinb1*e):(o=this.qp*(a=h*e/s),s*n)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(!(o=r*r+(h=this.mode===this.N_POLE?-h:h)*h))return t.x=this.long0,t.y=this.lat0,t;a=1-o/this.qp,this.mode===this.S_POLE&&(a=-a)}i=Math.atan2(r,h),n=Math.asin(a),o=this.apa,a=n+n,l=n+o[0]*Math.sin(a)+o[1]*Math.sin(a+a)+o[2]*Math.sin(a+a+a)}return t.x=q(this.long0+i),t.y=l,t},names:["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],S_POLE:1,N_POLE:2,EQUIT:3,OBLIQ:4};var Pi={init:function(){Math.abs(this.lat1+this.lat2)<x||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=N(this.e3,this.sin_po,this.cos_po),this.qs1=pi(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=N(this.e3,this.sin_po,this.cos_po),this.qs2=pi(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=pi(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>x?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(t){var i=t.x,e=t.y;this.sin_phi=Math.sin(e),this.cos_phi=Math.cos(e);var s=pi(this.e3,this.sin_phi,this.cos_phi),e=this.a*Math.sqrt(this.c-this.ns0*s)/this.ns0,s=this.ns0*q(i-this.long0),i=e*Math.sin(s)+this.x0,s=this.rh-e*Math.cos(s)+this.y0;return t.x=i,t.y=s,t},inverse:function(t){var i,e,s,n;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,e=0<=this.ns0?(i=Math.sqrt(t.x*t.x+t.y*t.y),1):(i=-Math.sqrt(t.x*t.x+t.y*t.y),-1),(s=0)!==i&&(s=Math.atan2(e*t.x,e*t.y)),e=i*this.ns0/this.a,n=this.sphere?Math.asin((this.c-e*e)/(2*this.ns0)):(n=(this.c-e*e)/this.ns0,this.phi1z(this.e3,n)),s=q(s/this.ns0+this.long0),t.x=s,t.y=n,t},names:["Albers_Conic_Equal_Area","Albers","aea"],phi1z:function(t,i){var e,s,n,o=wi(.5*i);if(t<x)return o;for(var a=t*t,r=1;r<=25;r++)if(o+=n=.5*(s=1-(n=t*(e=Math.sin(o)))*n)*s/Math.cos(o)*(i/(1-a)-e/s+.5/t*Math.log((1-n)/(1+n))),Math.abs(n)<=1e-7)return o;return null}};var Li={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1},forward:function(t){var i,e=t.x,s=t.y,n=q(e-this.long0),o=Math.sin(s),a=Math.cos(s),e=Math.cos(n),e=0<(s=this.sin_p14*o+this.cos_p14*a*e)||Math.abs(s)<=x?(i=this.x0+ +this.a*a*Math.sin(n)/s,this.y0+ +this.a*(this.cos_p14*o-this.sin_p14*a*e)/s):(i=this.x0+this.infinity_dist*a*Math.sin(n),this.y0+this.infinity_dist*(this.cos_p14*o-this.sin_p14*a*e));return t.x=i,t.y=e,t},inverse:function(t){var i,e,s,n;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,s=(i=Math.sqrt(t.x*t.x+t.y*t.y))?(n=Math.atan2(i,this.rc),s=Math.sin(n),e=Math.cos(n),n=wi(e*this.sin_p14+t.y*s*this.cos_p14/i),s=Math.atan2(t.x*s,i*this.cos_p14*e-t.y*this.sin_p14*s),q(this.long0+s)):(n=this.phic0,0),t.x=s,t.y=n,t},names:["gnom"]};var Ci={init:function(){this.sphere||(this.k0=N(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(t){var i,e,s=t.x,n=t.y,s=q(s-this.long0);return e=this.sphere?(i=this.x0+this.a*s*Math.cos(this.lat_ts),this.y0+this.a*Math.sin(n)/Math.cos(this.lat_ts)):(e=pi(this.e,Math.sin(n)),i=this.x0+this.a*this.k0*s,this.y0+this.a*e*.5/this.k0),t.x=i,t.y=e,t},inverse:function(t){var i,e;return t.x-=this.x0,t.y-=this.y0,this.sphere?(i=q(this.long0+t.x/this.a/Math.cos(this.lat_ts)),e=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(e=function(t,i){var e=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(i)-e)<1e-6)return i<0?-1*g:g;for(var s,n,o,a=Math.asin(.5*i),r=0;r<30;r++)if(s=Math.sin(a),n=Math.cos(a),o=t*s,a+=o=Math.pow(1-o*o,2)/(2*n)*(i/(1-t*t)-s/(1-o*o)+.5/t*Math.log((1-o)/(1+o))),Math.abs(o)<=1e-10)return a;return NaN}(this.e,2*t.y*this.k0/this.a),i=q(this.long0+t.x/(this.a*this.k0))),t.x=i,t.y=e,t},names:["cea"]};var Ti={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(t){var i=t.x,e=t.y,i=q(i-this.long0),e=ui(e-this.lat0);return t.x=this.x0+this.a*i*this.rc,t.y=this.y0+this.a*e,t},inverse:function(t){var i=t.x,e=t.y;return t.x=q(this.long0+(i-this.x0)/(this.a*this.rc)),t.y=ui(this.lat0+(e-this.y0)/this.a),t},names:["Equirectangular","Equidistant_Cylindrical","eqc"]};var Si={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=ai(this.es),this.e1=ri(this.es),this.e2=hi(this.es),this.e3=li(this.es),this.ml0=this.a*oi(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(t){var i,e=t.x,s=t.y,n=q(e-this.long0),e=n*Math.sin(s);return e=this.sphere?Math.abs(s)<=x?(i=this.a*n,-1*this.a*this.lat0):(i=this.a*Math.sin(e)/Math.tan(s),this.a*(ui(s-this.lat0)+(1-Math.cos(e))/Math.tan(s))):Math.abs(s)<=x?(i=this.a*n,-1*this.ml0):(i=(n=ci(this.a,this.e,Math.sin(s))/Math.tan(s))*Math.sin(e),this.a*oi(this.e0,this.e1,this.e2,this.e3,s)-this.ml0+n*(1-Math.cos(e))),t.x=i+this.x0,t.y=e+this.y0,t},inverse:function(t){var i,e,s,n,o,a,r=t.x-this.x0,h=t.y-this.y0;if(this.sphere)if(Math.abs(h+this.a*this.lat0)<=x)i=q(r/this.a+this.long0),e=0;else{for(var l,c=this.lat0+h/this.a,u=r*r/this.a/this.a+c*c,d=c,_=20;_;--_)if(d+=s=-1*(c*(d*(l=Math.tan(d))+1)-d-.5*(d*d+u)*l)/((d-c)/l-1),Math.abs(s)<=x){e=d;break}i=q(this.long0+Math.asin(r*Math.tan(d)/this.a)/Math.sin(e))}else if(Math.abs(h+this.ml0)<=x)e=0,i=q(this.long0+r/this.a);else{for(c=(this.ml0+h)/this.a,u=r*r/this.a/this.a+c*c,d=c,_=20;_;--_)if(a=this.e*Math.sin(d),n=Math.sqrt(1-a*a)*Math.tan(d),o=this.a*oi(this.e0,this.e1,this.e2,this.e3,d),a=this.e0-2*this.e1*Math.cos(2*d)+4*this.e2*Math.cos(4*d)-6*this.e3*Math.cos(6*d),d-=s=(c*(n*(o=o/this.a)+1)-o-.5*n*(o*o+u))/(this.es*Math.sin(2*d)*(o*o+u-2*c*o)/(4*n)+(c-o)*(n*a-2/Math.sin(2*d))-a),Math.abs(s)<=x){e=d;break}n=Math.sqrt(1-this.es*Math.pow(Math.sin(e),2))*Math.tan(e),i=q(this.long0+Math.asin(r*n/this.a)/Math.sin(e))}return t.x=i,t.y=e,t},names:["Polyconic","poly"]};var Ei={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(t){for(var i=t.x,e=t.y-this.lat0,i=i-this.long0,s=e/b*1e-5,i=i,n=1,o=0,a=1;a<=10;a++)o+=this.A[a]*(n*=s);var r,h=o,l=i,c=1,u=0,d=0,_=0;for(a=1;a<=6;a++)r=u*h+c*l,d=d+this.B_re[a]*(c=c*h-u*l)-this.B_im[a]*(u=r),_=_+this.B_im[a]*c+this.B_re[a]*u;return t.x=_*this.a+this.x0,t.y=d*this.a+this.y0,t},inverse:function(t){var i,e=t.x,s=t.y,e=e-this.x0,n=(s-this.y0)/this.a,o=e/this.a,a=1,r=0,h=0,l=0;for(f=1;f<=6;f++)i=r*n+a*o,h=h+this.C_re[f]*(a=a*n-r*o)-this.C_im[f]*(r=i),l=l+this.C_im[f]*a+this.C_re[f]*r;for(var c=0;c<this.iterations;c++){for(var u,d=h,_=l,p=n,m=o,f=2;f<=6;f++)u=_*h+d*l,d=d*h-_*l,_=u,p+=(f-1)*(this.B_re[f]*d-this.B_im[f]*_),m+=(f-1)*(this.B_im[f]*d+this.B_re[f]*_);var d=1,_=0,g=this.B_re[1],v=this.B_im[1];for(f=2;f<=6;f++)u=_*h+d*l,d=d*h-_*l,_=u,g+=f*(this.B_re[f]*d-this.B_im[f]*_),v+=f*(this.B_im[f]*d+this.B_re[f]*_);var y=g*g+v*v,h=(p*g+m*v)/y,l=(m*g-p*v)/y}var M=h,s=l,x=1,w=0;for(f=1;f<=9;f++)w+=this.D[f]*(x*=M);return e=this.lat0+w*b*1e5,s=this.long0+s,t.x=s,t.y=e,t},names:["New_Zealand_Map_Grid","nzmg"]};var ki={init:function(){},forward:function(t){var i=t.x,e=t.y,i=q(i-this.long0),i=this.x0+this.a*i,e=this.y0+this.a*Math.log(Math.tan(Math.PI/4+e/2.5))*1.25;return t.x=i,t.y=e,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var i=q(this.long0+t.x/this.a),e=2.5*(Math.atan(Math.exp(.8*t.y/this.a))-Math.PI/4);return t.x=i,t.y=e,t},names:["Miller_Cylindrical","mill"]};var zi={init:function(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=Tt(this.es)},forward:function(t){var i=t.x,e=t.y,i=q(i-this.long0);if(this.sphere){if(this.m)for(var s=this.n*Math.sin(e),n=20;n;--n){var o=(this.m*e+Math.sin(e)-s)/(this.m+Math.cos(e));if(e-=o,Math.abs(o)<x)break}else e=1!==this.n?Math.asin(this.n*Math.sin(e)):e;l=this.a*this.C_x*i*(this.m+Math.cos(e)),h=this.a*this.C_y*e}else var a=Math.sin(e),r=Math.cos(e),h=this.a*qt(e,a,r,this.en),l=this.a*i*r/Math.sqrt(1-this.es*a*a);return t.x=l,t.y=h,t},inverse:function(t){var i,e,s,n;return t.x-=this.x0,s=t.x/this.a,t.y-=this.y0,i=t.y/this.a,this.sphere?(i/=this.C_y,s/=this.C_x*(this.m+Math.cos(i)),this.m?i=wi((this.m*i+Math.sin(i))/this.n):1!==this.n&&(i=wi(Math.sin(i)/this.n)),s=q(s+this.long0),i=ui(i)):(i=St(t.y/this.a,this.es,this.en),(n=Math.abs(i))<g?(n=Math.sin(i),e=this.long0+t.x*Math.sqrt(1-this.es*n*n)/(this.a*Math.cos(i)),s=q(e)):n-x<g&&(s=this.long0)),t.x=s,t.y=i,t},names:["Sinusoidal","sinu"]};var Ai={init:function(){},forward:function(t){for(var i=t.x,e=t.y,i=q(i-this.long0),s=e,n=Math.PI*Math.sin(e);;){var o=-(s+Math.sin(s)-n)/(1+Math.cos(s));if(s+=o,Math.abs(o)<x)break}return s/=2,Math.PI/2-Math.abs(e)<x&&(i=0),e=.900316316158*this.a*i*Math.cos(s)+this.x0,i=1.4142135623731*this.a*Math.sin(s)+this.y0,t.x=e,t.y=i,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0,s=t.y/(1.4142135623731*this.a),.999999999999<Math.abs(s)&&(s=.999999999999);var i=Math.asin(s),e=q(this.long0+t.x/(.900316316158*this.a*Math.cos(i)));(e=e<-Math.PI?-Math.PI:e)>Math.PI&&(e=Math.PI),s=(2*i+Math.sin(2*i))/Math.PI,1<Math.abs(s)&&(s=1);var s=Math.asin(s);return t.x=e,t.y=s,t},names:["Mollweide","moll"]};var Oi={init:function(){Math.abs(this.lat1+this.lat2)<x||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=ai(this.es),this.e1=ri(this.es),this.e2=hi(this.es),this.e3=li(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=N(this.e,this.sinphi,this.cosphi),this.ml1=oi(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<x?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=N(this.e,this.sinphi,this.cosphi),this.ml2=oi(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=oi(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))},forward:function(t){var i=t.x,e=t.y;e=this.sphere?this.a*(this.g-e):(s=oi(this.e0,this.e1,this.e2,this.e3,e),this.a*(this.g-s));var s=this.ns*q(i-this.long0),i=this.x0+e*Math.sin(s),s=this.y0+this.rh-e*Math.cos(s);return t.x=i,t.y=s,t},inverse:function(t){t.x-=this.x0,t.y=this.rh-t.y+this.y0;var i=0<=this.ns?(s=Math.sqrt(t.x*t.x+t.y*t.y),1):(s=-Math.sqrt(t.x*t.x+t.y*t.y),-1),e=0;if(0!==s&&(e=Math.atan2(i*t.x,i*t.y)),this.sphere)return o=q(this.long0+e/this.ns),n=ui(this.g-s/this.a),t.x=o,t.y=n,t;var s=this.g-s/this.a,n=di(s,this.e0,this.e1,this.e2,this.e3),o=q(this.long0+e/this.ns);return t.x=o,t.y=n,t},names:["Equidistant_Conic","eqdc"]};var Ii={init:function(){this.R=this.a},forward:function(t){var i=t.x,e=t.y,s=q(i-this.long0);Math.abs(e)<=x&&(l=this.x0+this.R*s,c=this.y0);var n=wi(2*Math.abs(e/Math.PI));(Math.abs(s)<=x||Math.abs(Math.abs(e)-g)<=x)&&(l=this.x0,c=0<=e?this.y0+Math.PI*this.R*Math.tan(.5*n):this.y0+Math.PI*this.R*-Math.tan(.5*n));var o=.5*Math.abs(Math.PI/s-s/Math.PI),a=o*o,r=Math.sin(n),h=Math.cos(n),h=(n=(i=h/(r+h-1))*(2/r-1))*n,r=Math.PI*this.R*(o*(i-h)+Math.sqrt(a*(i-h)*(i-h)-(h+a)*(i*i-h)))/(h+a),l=this.x0+(r=s<0?-r:r),i=a+i,r=Math.PI*this.R*(n*i-o*Math.sqrt((h+a)*(1+a)-i*i))/(h+a),c=0<=e?this.y0+r:this.y0-r;return t.x=l,t.y=c,t},inverse:function(t){var i,e,s,n,o,a,r;return t.x-=this.x0,t.y-=this.y0,r=Math.PI*this.R,s=(i=t.x/r)*i+(e=t.y/r)*e,r=3*(e*e/(o=-2*(a=-Math.abs(e)*(1+s))+1+2*e*e+s*s)+(2*(n=a-2*e*e+i*i)*n*n/o/o/o-9*a*n/o/o)/27)/(a=(a-n*n/3/o)/o)/(a=2*Math.sqrt(-a/3)),1<Math.abs(r)&&(r=0<=r?1:-1),r=Math.acos(r)/3,o=0<=t.y?(-a*Math.cos(r+Math.PI/3)-n/3/o)*Math.PI:-(-a*Math.cos(r+Math.PI/3)-n/3/o)*Math.PI,i=Math.abs(i)<x?this.long0:q(this.long0+Math.PI*(s-1+Math.sqrt(1+2*(i*i-e*e)+s*s))/2/i),t.x=i,t.y=o,t},names:["Van_der_Grinten_I","VanDerGrinten","vandg"]};var Zi={init:function(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)},forward:function(t){var i,e,s,n,o,a,r=t.x,h=t.y,l=Math.sin(t.y),c=Math.cos(t.y),u=q(r-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=x?(t.x=this.x0+this.a*(g-h)*Math.sin(u),t.y=this.y0-this.a*(g-h)*Math.cos(u)):Math.abs(this.sin_p12+1)<=x?(t.x=this.x0+this.a*(g+h)*Math.sin(u),t.y=this.y0+this.a*(g+h)*Math.cos(u)):(o=this.sin_p12*l+this.cos_p12*c*Math.cos(u),n=(s=Math.acos(o))?s/Math.sin(s):1,t.x=this.x0+this.a*n*c*Math.sin(u),t.y=this.y0+this.a*n*(this.cos_p12*l-this.sin_p12*c*Math.cos(u))):(i=ai(this.es),r=ri(this.es),o=hi(this.es),n=li(this.es),Math.abs(this.sin_p12-1)<=x?(e=this.a*oi(i,r,o,n,g),a=this.a*oi(i,r,o,n,h),t.x=this.x0+(e-a)*Math.sin(u),t.y=this.y0-(e-a)*Math.cos(u)):Math.abs(this.sin_p12+1)<=x?(e=this.a*oi(i,r,o,n,g),a=this.a*oi(i,r,o,n,h),t.x=this.x0+(e+a)*Math.sin(u),t.y=this.y0+(e+a)*Math.cos(u)):(h=l/c,e=ci(this.a,this.e,this.sin_p12),a=ci(this.a,this.e,l),l=Math.atan((1-this.es)*h+this.es*e*this.sin_p12/(a*c)),a=0===(h=Math.atan2(Math.sin(u),this.cos_p12*Math.tan(l)-this.sin_p12*Math.cos(u)))?Math.asin(this.cos_p12*Math.sin(l)-this.sin_p12*Math.cos(l)):Math.abs(Math.abs(h)-Math.PI)<=x?-Math.asin(this.cos_p12*Math.sin(l)-this.sin_p12*Math.cos(l)):Math.asin(Math.sin(u)*Math.cos(l)/Math.sin(h)),c=this.e*this.sin_p12/Math.sqrt(1-this.es),u=this.e*this.cos_p12*Math.cos(h)/Math.sqrt(1-this.es),t.x=this.x0+(s=e*a*(1-(l=a*a)*(e=u*u)*(1-e)/6+(l=l*a)/8*(u=c*u)*(1-2*e)+(l=l*a)/120*(e*(4-7*e)-3*c*c*(1-7*e))-l*a/48*u))*Math.sin(h),t.y=this.y0+s*Math.cos(h))),t},inverse:function(t){var i,e,s,n,o,a,r,h;return t.x-=this.x0,t.y-=this.y0,this.sphere?(i=Math.sqrt(t.x*t.x+t.y*t.y))>2*g*this.a?void 0:(r=i/this.a,h=Math.sin(r),a=Math.cos(r),e=this.long0,Math.abs(i)<=x?s=this.lat0:(s=wi(a*this.sin_p12+t.y*h*this.cos_p12/i),o=Math.abs(this.lat0)-g,e=Math.abs(o)<=x?0<=this.lat0?q(this.long0+Math.atan2(t.x,-t.y)):q(this.long0-Math.atan2(-t.x,t.y)):q(this.long0+Math.atan2(t.x*h,i*this.cos_p12*a-t.y*this.sin_p12*h))),t.x=e,t.y=s,t):(r=ai(this.es),o=ri(this.es),a=hi(this.es),h=li(this.es),Math.abs(this.sin_p12-1)<=x?(n=this.a*oi(r,o,a,h,g),i=Math.sqrt(t.x*t.x+t.y*t.y),s=di((n-i)/this.a,r,o,a,h),e=q(this.long0+Math.atan2(t.x,-1*t.y))):Math.abs(this.sin_p12+1)<=x?(n=this.a*oi(r,o,a,h,g),i=Math.sqrt(t.x*t.x+t.y*t.y),s=di((i-n)/this.a,r,o,a,h),e=q(this.long0+Math.atan2(t.x,t.y))):(i=Math.sqrt(t.x*t.x+t.y*t.y),n=Math.atan2(t.x,t.y),r=ci(this.a,this.e,this.sin_p12),o=Math.cos(n),h=-(a=this.e*this.cos_p12*o)*a/(1-this.es),a=3*this.es*(1-h)*this.sin_p12*this.cos_p12*o/(1-this.es),r=1-h*(h=(r=i/r)-h*(1+h)*Math.pow(r,3)/6-a*(1+3*h)*Math.pow(r,4)/24)*h/2-r*h*h*h/6,o=Math.asin(this.sin_p12*Math.cos(h)+this.cos_p12*Math.sin(h)*o),e=q(this.long0+Math.asin(Math.sin(n)*Math.sin(h)/Math.cos(o))),h=Math.sin(o),s=Math.atan2((h-this.es*r*this.sin_p12)*Math.tan(o),h*(1-this.es))),t.x=e,t.y=s,t)},names:["Azimuthal_Equidistant","aeqd"]};var Bi={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function(t){var i,e,s=t.x,n=t.y,o=q(s-this.long0),a=Math.sin(n),r=Math.cos(n),s=Math.cos(o);return(0<(n=this.sin_p14*a+this.cos_p14*r*s)||Math.abs(n)<=x)&&(i=+this.a*r*Math.sin(o),e=this.y0+ +this.a*(this.cos_p14*a-this.sin_p14*r*s)),t.x=i,t.y=e,t},inverse:function(t){var i,e,s,n,o,a;return t.x-=this.x0,t.y-=this.y0,i=Math.sqrt(t.x*t.x+t.y*t.y),n=wi(i/this.a),e=Math.sin(n),s=Math.cos(n),o=this.long0,Math.abs(i)<=x?(a=this.lat0,t.x=o,t.y=a,t):(a=wi(s*this.sin_p14+t.y*e*this.cos_p14/i),n=Math.abs(this.lat0)-g,o=Math.abs(n)<=x?0<=this.lat0?q(this.long0+Math.atan2(t.x,-t.y)):q(this.long0-Math.atan2(-t.x,t.y)):q(this.long0+Math.atan2(t.x*e,i*this.cos_p14*s-t.y*this.sin_p14*e)),t.x=o,t.y=a,t)},names:["ortho"]},Ni=1,Ri=2,ji=3,Di=4,qi=5,Gi=6,Fi={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function Hi(t,i,e,s){var n;return t<x?(s.value=Fi.AREA_0,n=0):(n=Math.atan2(i,e),Math.abs(n)<=w?s.value=Fi.AREA_0:w<n&&n<=g+w?(s.value=Fi.AREA_1,n-=g):g+w<n||n<=-(g+w)?(s.value=Fi.AREA_2,n=0<=n?n-c:n+c):(s.value=Fi.AREA_3,n+=g)),n}function Ui(t,i){i=t+i;return i<-c?i+=e:+c<i&&(i-=e),i}function Wi(t,i){return t[0]+i*(t[1]+i*(t[2]+i*t[3]))}var Vi={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=g-w/2?this.face=qi:this.lat0<=-(g-w/2)?this.face=Gi:Math.abs(this.long0)<=w?this.face=Ni:Math.abs(this.long0)<=g+w?this.face=0<this.long0?Ri:Di:this.face=ji,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(t){var i,e,s,n,o,a,r,h={x:0,y:0},l={value:0};return t.x-=this.long0,r=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(t.y)):t.y,i=t.x,this.face===qi?(e=g-r,s=w<=i&&i<=g+w?(l.value=Fi.AREA_0,i-g):g+w<i||i<=-(g+w)?(l.value=Fi.AREA_1,0<i?i-c:i+c):-(g+w)<i&&i<=-w?(l.value=Fi.AREA_2,i+g):(l.value=Fi.AREA_3,i)):this.face===Gi?(e=g+r,s=w<=i&&i<=g+w?(l.value=Fi.AREA_0,-i+g):i<w&&-w<=i?(l.value=Fi.AREA_1,-i):i<-w&&-(g+w)<=i?(l.value=Fi.AREA_2,-i-g):(l.value=Fi.AREA_3,0<i?-i+c:-i-c)):(this.face===Ri?i=Ui(i,+g):this.face===ji?i=Ui(i,+c):this.face===Di&&(i=Ui(i,-g)),o=Math.sin(r),a=Math.cos(r),r=Math.sin(i),n=a*Math.cos(i),r=a*r,o=o,this.face===Ni?s=Hi(e=Math.acos(n),o,r,l):this.face===Ri?s=Hi(e=Math.acos(r),o,-n,l):this.face===ji?s=Hi(e=Math.acos(-n),o,-r,l):this.face===Di?s=Hi(e=Math.acos(-r),o,n,l):(e=s=0,l.value=Fi.AREA_0)),n=Math.atan(12/c*(s+Math.acos(Math.sin(s)*Math.cos(w))-g)),s=Math.sqrt((1-Math.cos(e))/(Math.cos(n)*Math.cos(n))/(1-Math.cos(Math.atan(1/Math.cos(s))))),l.value===Fi.AREA_1?n+=g:l.value===Fi.AREA_2?n+=c:l.value===Fi.AREA_3&&(n+=1.5*c),h.x=s*Math.cos(n),h.y=s*Math.sin(n),h.x=h.x*this.a+this.x0,h.y=h.y*this.a+this.y0,t.x=h.x,t.y=h.y,t},inverse:function(t){var i,e,s,n,o,a,r,h={lam:0,phi:0},l={value:0};return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,e=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y)),i=Math.atan2(t.y,t.x),0<=t.x&&t.x>=Math.abs(t.y)?l.value=Fi.AREA_0:0<=t.y&&t.y>=Math.abs(t.x)?(l.value=Fi.AREA_1,i-=g):t.x<0&&-t.x>=Math.abs(t.y)?(l.value=Fi.AREA_2,i=i<0?i+c:i-c):(l.value=Fi.AREA_3,i+=g),n=c/12*Math.tan(i),o=Math.sin(n)/(Math.cos(n)-1/Math.sqrt(2)),o=Math.atan(o),(e=1-(i=Math.cos(i))*i*(e=Math.tan(e))*e*(1-Math.cos(Math.atan(1/Math.cos(o)))))<-1?e=-1:1<e&&(e=1),this.face===qi?(s=Math.acos(e),h.phi=g-s,l.value===Fi.AREA_0?h.lam=o+g:l.value===Fi.AREA_1?h.lam=o<0?o+c:o-c:l.value===Fi.AREA_2?h.lam=o-g:h.lam=o):this.face===Gi?(s=Math.acos(e),h.phi=s-g,l.value===Fi.AREA_0?h.lam=-o+g:l.value===Fi.AREA_1?h.lam=-o:l.value===Fi.AREA_2?h.lam=-o-g:h.lam=o<0?-o-c:-o+c):(o=1<=(n=(r=e)*r)?0:Math.sqrt(1-n)*Math.sin(o),a=1<=(n+=o*o)?0:Math.sqrt(1-n),l.value===Fi.AREA_1?(n=a,a=-o,o=n):l.value===Fi.AREA_2?(a=-a,o=-o):l.value===Fi.AREA_3&&(n=a,a=o,o=-n),this.face===Ri?(n=r,r=-a,a=n):this.face===ji?(r=-r,a=-a):this.face===Di&&(n=r,r=a,a=-n),h.phi=Math.acos(-o)-g,h.lam=Math.atan2(a,r),this.face===Ri?h.lam=Ui(h.lam,-g):this.face===ji?h.lam=Ui(h.lam,-c):this.face===Di&&(h.lam=Ui(h.lam,+g))),0!==this.es&&(a=h.phi<0?1:0,r=Math.tan(h.phi),r=this.b/Math.sqrt(r*r+this.one_minus_f_squared),h.phi=Math.atan(Math.sqrt(this.a*this.a-r*r)/(this.one_minus_f*r)),a&&(h.phi=-h.phi)),h.lam+=this.long0,t.x=h.lam,t.y=h.phi,t},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]},Ki=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],Xi=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Ji=o/5,Qi=1/Ji;var Yi={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(t){var i=q(t.x-this.long0),e=Math.abs(t.y),s=Math.floor(e*Ji);return s<0?s=0:18<=s&&(s=17),e={x:Wi(Ki[s],e=o*(e-Qi*s))*i,y:Wi(Xi[s],e)},t.y<0&&(e.y=-e.y),e.x=e.x*this.a*.8487+this.x0,e.y=e.y*this.a*1.3523+this.y0,e},inverse:function(t){var i={x:(t.x-this.x0)/(.8487*this.a),y:Math.abs(t.y-this.y0)/(1.3523*this.a)};if(1<=i.y)i.x/=Ki[18][0],i.y=t.y<0?-g:g;else{var e=Math.floor(18*i.y);for(e<0?e=0:18<=e&&(e=17);;)if(Xi[e][0]>i.y)--e;else{if(!(Xi[e+1][0]<=i.y))break;++e}var s=Xi[e],n=function(t,i,e,s){for(var n=i;s;--s){var o=t(n);if(n-=o,Math.abs(o)<e)break}return n}(function(t){return(Wi(s,t)-i.y)/(s[1]+t*(2*s[2]+3*t*s[3]))},n=5*(i.y-s[0])/(Xi[e+1][0]-s[0]),x,100);i.x/=Wi(Ki[e],n),i.y=(5*e+n)*r,t.y<0&&(i.y=-i.y)}return i.x=q(i.x+this.long0),i},names:["Robinson","robin"]};W={init:function(){this.name="geocent"},forward:function(t){return Q(t,this.es,this.a)},inverse:function(t){return Y(t,this.es,this.a,this.b)},names:["Geocentric","geocentric","geocent","Geocent"]};return lt.defaultDatum="WGS84",lt.Proj=J,lt.WGS84=new lt.Proj("WGS84"),lt.Point=Ct,lt.toPoint=et,lt.defs=A,lt.transform=ot,lt.mgrs=vt,lt.version="2.6.2",(vt=lt).Proj.projections.add(Ut),vt.Proj.projections.add(Jt),vt.Proj.projections.add(Yt),vt.Proj.projections.add(ti),vt.Proj.projections.add(ii),vt.Proj.projections.add(ei),vt.Proj.projections.add(si),vt.Proj.projections.add(ni),vt.Proj.projections.add(_i),vt.Proj.projections.add(mi),vt.Proj.projections.add(bi),vt.Proj.projections.add(Pi),vt.Proj.projections.add(Li),vt.Proj.projections.add(Ci),vt.Proj.projections.add(Ti),vt.Proj.projections.add(Si),vt.Proj.projections.add(Ei),vt.Proj.projections.add(ki),vt.Proj.projections.add(zi),vt.Proj.projections.add(Ai),vt.Proj.projections.add(Oi),vt.Proj.projections.add(Ii),vt.Proj.projections.add(Zi),vt.Proj.projections.add(Bi),vt.Proj.projections.add(Vi),vt.Proj.projections.add(Yi),vt.Proj.projections.add(W),lt}),function(t){var i,e;if("function"==typeof define&&define.amd)define(["leaflet","proj4"],t);else if("undefined"!=typeof process&&-1!==process.release.name.search(/node|io.js/))i=require("leaflet"),e=require("proj4"),module.exports=t(i,e);else{if(void 0===window.L||void 0===window.proj4)throw"Leaflet and proj4 must be loaded first";t(window.L,window.proj4)}}(function(a,e){return e.__esModule&&e.default&&(e=e.default),a.Proj={},a.Proj._isProj4Obj=function(t){return void 0!==t.inverse&&void 0!==t.forward},a.Proj.Projection=a.Class.extend({initialize:function(t,i,e){var s=a.Proj._isProj4Obj(t);this._proj=s?t:this._projFromCodeDef(t,i),this.bounds=s?i:e},project:function(t){t=this._proj.forward([t.lng,t.lat]);return new a.Point(t[0],t[1])},unproject:function(t,i){t=this._proj.inverse([t.x,t.y]);return new a.LatLng(t[1]||0,t[0]||0,i)},_projFromCodeDef:function(t,i){if(i)e.defs(t,i);else if(void 0===e.defs[t]){i=t.split(":");if(3<i.length&&(t=i[i.length-3]+":"+i[i.length-1]),void 0===e.defs[t])throw"No projection definition for code "+t}return e(t)}}),a.Proj.CRS=a.Class.extend({includes:a.CRS,options:{transformation:new a.Transformation(1,0,-1,0)},initialize:function(t,i,e){var s,n;if(a.Proj._isProj4Obj(t)?(s=t.srsCode,this.projection=new a.Proj.Projection(t,(n=i||{}).bounds)):this.projection=new a.Proj.Projection(s=t,i,(n=e||{}).bounds),a.Util.setOptions(this,n),this.code=s,this.transformation=this.options.transformation,this.options.origin&&(this.transformation=new a.Transformation(1,-this.options.origin[0],-1,this.options.origin[1])),this.options.scales)this._scales=this.options.scales;else if(this.options.resolutions){this._scales=[];for(var o=this.options.resolutions.length-1;0<=o;o--)this.options.resolutions[o]&&(this._scales[o]=1/this.options.resolutions[o])}this.infinite=!this.options.bounds},scale:function(t){var i,e=Math.floor(t);return t===e?this._scales[t]:(i=this._scales[e])+(this._scales[e+1]-i)*(t-e)},zoom:function(t){var i,e=this._closestElement(this._scales,t),s=this._scales.indexOf(e);return t===e?s:void 0===e?-1/0:void 0===(i=this._scales[s+1])?1/0:(t-e)/(i-e)+s},distance:a.CRS.Earth.distance,R:a.CRS.Earth.R,_closestElement:function(t,i){for(var e,s=t.length;s--;)t[s]<=i&&(void 0===e||e<t[s])&&(e=t[s]);return e}}),a.Proj.GeoJSON=a.GeoJSON.extend({initialize:function(t,i){this._callLevel=0,a.GeoJSON.prototype.initialize.call(this,t,i)},addData:function(t){var i;t&&(t.crs&&"name"===t.crs.type?i=new a.Proj.CRS(t.crs.properties.name):t.crs&&t.crs.type&&(i=new a.Proj.CRS(t.crs.type+":"+t.crs.properties.code)),void 0!==i&&(this.options.coordsToLatLng=function(t){t=a.point(t[0],t[1]);return i.projection.unproject(t)})),this._callLevel++;try{a.GeoJSON.prototype.addData.call(this,t)}finally{this._callLevel--,0===this._callLevel&&delete this.options.coordsToLatLng}}}),a.Proj.geoJson=function(t,i){return new a.Proj.GeoJSON(t,i)},a.Proj.ImageOverlay=a.ImageOverlay.extend({initialize:function(t,i,e){a.ImageOverlay.prototype.initialize.call(this,t,null,e),this._projectedBounds=i},_animateZoom:function(t){var i=this._map.getZoomScale(t.zoom),e=a.point(this._projectedBounds.min.x,this._projectedBounds.max.y),t=this._projectedToNewLayerPoint(e,t.zoom,t.center);a.DomUtil.setTransform(this._image,t,i)},_reset:function(){var t=this._map.getZoom(),i=this._map.getPixelOrigin(),t=a.bounds(this._transform(this._projectedBounds.min,t)._subtract(i),this._transform(this._projectedBounds.max,t)._subtract(i)),i=t.getSize();a.DomUtil.setPosition(this._image,t.min),this._image.style.width=i.x+"px",this._image.style.height=i.y+"px"},_projectedToNewLayerPoint:function(t,i,e){var s=this._map.getSize()._divideBy(2),s=this._map.project(e,i)._subtract(s)._round().add(this._map._getMapPanePos());return this._transform(t,i)._subtract(s)},_transform:function(t,i){var e=this._map.options.crs,s=e.transformation,i=e.scale(i);return s.transform(t,i)}}),a.Proj.imageOverlay=function(t,i,e){return new a.Proj.ImageOverlay(t,i,e)},a.Proj}),function(t,i){"function"==typeof define&&define.amd?define(["leaflet"],t):"object"==typeof exports&&(void 0!==i&&i.L?module.exports=t(L):module.exports=t(require("leaflet"))),void 0!==i&&i.L&&(i.L.Control.Locate=t(L))}(function(r){const e=(i,e,t)=>{(t=t.split(" ")).forEach(function(t){r.DomUtil[i].call(this,e,t)})},i=(t,i)=>e("addClass",t,i),s=(t,i)=>e("removeClass",t,i),t=r.Marker.extend({initialize(t,i){r.Util.setOptions(this,i),this._latlng=t,this.createIcon()},createIcon(){var t=this.options;let i="";void 0!==t.color&&(i+=`stroke:${t.color};`),void 0!==t.weight&&(i+=`stroke-width:${t.weight};`),void 0!==t.fillColor&&(i+=`fill:${t.fillColor};`),void 0!==t.fillOpacity&&(i+=`fill-opacity:${t.fillOpacity};`),void 0!==t.opacity&&(i+=`opacity:${t.opacity};`);t=this._getIconSVG(t,i);this._locationIcon=r.divIcon({className:t.className,html:t.svg,iconSize:[t.w,t.h]}),this.setIcon(this._locationIcon)},_getIconSVG(t,i){var e=t.radius,s=e+t.weight,t=2*s;return{className:"leaflet-control-locate-location",svg:`<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${t}" version="1.1" viewBox="-${s} -${s} ${t} ${t}">`+'<circle r="'+e+'" style="'+i+'" /></svg>',w:t,h:t}},setStyle(t){r.Util.setOptions(this,t),this.createIcon()}});var n=t.extend({initialize(t,i,e){r.Util.setOptions(this,e),this._latlng=t,this._heading=i,this.createIcon()},setHeading(t){this._heading=t},_getIconSVG(t,i){var e=t.radius,s=t.width+t.weight,e=2*(e+t.depth+t.weight),t=`M0,0 l${t.width/2},${t.depth} l-${s},0 z`;return{className:"leaflet-control-locate-heading",svg:`<svg xmlns="http://www.w3.org/2000/svg" width="${s}" height="${e}" version="1.1" viewBox="-${s/2} 0 ${s} ${e}" style="${`transform: rotate(${this._heading}deg)`}">`+'<path d="'+t+'" style="'+i+'" /></svg>',w:s,h:e}}}),n=r.Control.extend({options:{position:"topleft",layer:void 0,setView:"untilPanOrZoom",keepCurrentZoomLevel:!1,initialZoomLevel:!1,getLocationBounds(t){return t.bounds},flyTo:!1,clickBehavior:{inView:"stop",outOfView:"setView",inViewNotFollowing:"inView"},returnToPrevBounds:!1,cacheLocation:!0,drawCircle:!0,drawMarker:!0,showCompass:!0,markerClass:t,compassClass:n,circleStyle:{className:"leaflet-control-locate-circle",color:"#136AEC",fillColor:"#136AEC",fillOpacity:.15,weight:0},markerStyle:{className:"leaflet-control-locate-marker",color:"#fff",fillColor:"#2A93EE",fillOpacity:1,weight:3,opacity:1,radius:9},compassStyle:{fillColor:"#2A93EE",fillOpacity:1,weight:0,color:"#fff",opacity:1,radius:9,width:9,depth:6},followCircleStyle:{},followMarkerStyle:{},followCompassStyle:{},icon:"leaflet-control-locate-location-arrow",iconLoading:"leaflet-control-locate-spinner",iconElementTag:"span",textElementTag:"small",circlePadding:[0,0],metric:!0,createButtonCallback(t,i){const e=r.DomUtil.create("a","leaflet-bar-part leaflet-bar-part-single",t);e.title=i.strings.title,e.href="#",e.setAttribute("role","button");const s=r.DomUtil.create(i.iconElementTag,i.icon,e);if(void 0!==i.strings.text){const n=r.DomUtil.create(i.textElementTag,"leaflet-locate-text",e);n.textContent=i.strings.text,e.classList.add("leaflet-locate-text-active"),e.parentNode.style.display="flex",0<i.icon.length&&s.classList.add("leaflet-locate-icon")}return{link:e,icon:s}},onLocationError(t,i){alert(t.message)},onLocationOutsideMapBounds(t){t.stop(),alert(t.options.strings.outsideMapBoundsMsg)},showPopup:!0,strings:{title:"Show me where I am",metersUnit:"meters",feetUnit:"feet",popup:"You are within {distance} {unit} from this point",outsideMapBoundsMsg:"You seem located outside the boundaries of the map"},locateOptions:{maxZoom:1/0,watch:!0,setView:!1}},initialize(t){for(const i in t)"object"==typeof this.options[i]?r.extend(this.options[i],t[i]):this.options[i]=t[i];this.options.followMarkerStyle=r.extend({},this.options.markerStyle,this.options.followMarkerStyle),this.options.followCircleStyle=r.extend({},this.options.circleStyle,this.options.followCircleStyle),this.options.followCompassStyle=r.extend({},this.options.compassStyle,this.options.followCompassStyle)},onAdd(t){var i=r.DomUtil.create("div","leaflet-control-locate leaflet-bar leaflet-control");this._container=i,this._map=t,this._layer=this.options.layer||new r.LayerGroup,this._layer.addTo(t),this._event=void 0,this._compassHeading=null,this._prevBounds=null;t=this.options.createButtonCallback(i,this.options);return this._link=t.link,this._icon=t.icon,r.DomEvent.on(this._link,"click",function(t){r.DomEvent.stopPropagation(t),r.DomEvent.preventDefault(t),this._onClick()},this).on(this._link,"dblclick",r.DomEvent.stopPropagation),this._resetVariables(),this._map.on("unload",this._unload,this),i},_onClick(){this._justClicked=!0;var i=this._isFollowing();if(this._userPanned=!1,this._userZoomed=!1,this._active&&!this._event)this.stop();else if(this._active){var e=this.options.clickBehavior;let t=e.outOfView;switch(this._map.getBounds().contains(this._event.latlng)&&(t=i?e.inView:e.inViewNotFollowing),e[t]&&(t=e[t]),t){case"setView":this.setView();break;case"stop":if(this.stop(),this.options.returnToPrevBounds){const s=this.options.flyTo?this._map.flyToBounds:this._map.fitBounds;s.bind(this._map)(this._prevBounds)}}}else this.options.returnToPrevBounds&&(this._prevBounds=this._map.getBounds()),this.start();this._updateContainerStyle()},start(){this._activate(),this._event&&(this._drawMarker(this._map),this.options.setView&&this.setView()),this._updateContainerStyle()},stop(){this._deactivate(),this._cleanClasses(),this._resetVariables(),this._removeMarker()},stopFollowing(){this._userPanned=!0,this._updateContainerStyle(),this._drawMarker()},_activate(){if(!this._active&&this._map&&(this._map.locate(this.options.locateOptions),this._map.fire("locateactivate",this),this._active=!0,this._map.on("locationfound",this._onLocationFound,this),this._map.on("locationerror",this._onLocationError,this),this._map.on("dragstart",this._onDrag,this),this._map.on("zoomstart",this._onZoom,this),this._map.on("zoomend",this._onZoomEnd,this),this.options.showCompass)){const t="ondeviceorientationabsolute"in window;if(t||"ondeviceorientation"in window){const i=this,e=function(){r.DomEvent.on(window,t?"deviceorientationabsolute":"deviceorientation",i._onDeviceOrientation,i)};DeviceOrientationEvent&&"function"==typeof DeviceOrientationEvent.requestPermission?DeviceOrientationEvent.requestPermission().then(function(t){"granted"===t&&e()}):e()}}},_deactivate(){this._active&&this._map&&(this._map.stopLocate(),this._map.fire("locatedeactivate",this),this._active=!1,this.options.cacheLocation||(this._event=void 0),this._map.off("locationfound",this._onLocationFound,this),this._map.off("locationerror",this._onLocationError,this),this._map.off("dragstart",this._onDrag,this),this._map.off("zoomstart",this._onZoom,this),this._map.off("zoomend",this._onZoomEnd,this),this.options.showCompass&&(this._compassHeading=null,"ondeviceorientationabsolute"in window?r.DomEvent.off(window,"deviceorientationabsolute",this._onDeviceOrientation,this):"ondeviceorientation"in window&&r.DomEvent.off(window,"deviceorientation",this._onDeviceOrientation,this)))},setView(){var t;this._drawMarker(),this._isOutsideMapBounds()?(this._event=void 0,this.options.onLocationOutsideMapBounds(this)):this._justClicked&&!1!==this.options.initialZoomLevel?(t=this.options.flyTo?this._map.flyTo:this._map.setView).bind(this._map)([this._event.latitude,this._event.longitude],this.options.initialZoomLevel):this.options.keepCurrentZoomLevel?(t=this.options.flyTo?this._map.flyTo:this._map.panTo).bind(this._map)([this._event.latitude,this._event.longitude]):(t=this.options.flyTo?this._map.flyToBounds:this._map.fitBounds,this._ignoreEvent=!0,t.bind(this._map)(this.options.getLocationBounds(this._event),{padding:this.options.circlePadding,maxZoom:this.options.initialZoomLevel||this.options.locateOptions.maxZoom}),r.Util.requestAnimFrame(function(){this._ignoreEvent=!1},this))},_drawCompass(){var t,i;this._event&&(t=this._event.latlng,this.options.showCompass&&t&&null!==this._compassHeading&&(i=this._isFollowing()?this.options.followCompassStyle:this.options.compassStyle,this._compass?(this._compass.setLatLng(t),this._compass.setHeading(this._compassHeading),this._compass.setStyle&&this._compass.setStyle(i)):this._compass=new this.options.compassClass(t,this._compassHeading,i).addTo(this._layer)),!this._compass||this.options.showCompass&&null!==this._compassHeading||(this._compass.removeFrom(this._layer),this._compass=null))},_drawMarker(){void 0===this._event.accuracy&&(this._event.accuracy=0);const t=this._event.accuracy;var i,e=this._event.latlng;this.options.drawCircle&&(i=this._isFollowing()?this.options.followCircleStyle:this.options.circleStyle,this._circle?this._circle.setLatLng(e).setRadius(t).setStyle(i):this._circle=r.circle(e,t,i).addTo(this._layer));let s,n;n=this.options.metric?(s=t.toFixed(0),this.options.strings.metersUnit):(s=(3.2808399*t).toFixed(0),this.options.strings.feetUnit),this.options.drawMarker&&(i=this._isFollowing()?this.options.followMarkerStyle:this.options.markerStyle,this._marker?(this._marker.setLatLng(e),this._marker.setStyle&&this._marker.setStyle(i)):this._marker=new this.options.markerClass(e,i).addTo(this._layer)),this._drawCompass();const o=this.options.strings.popup;function a(){return"string"==typeof o?r.Util.template(o,{distance:s,unit:n}):"function"==typeof o?o({distance:s,unit:n}):o}this.options.showPopup&&o&&this._marker&&this._marker.bindPopup(a())._popup.setLatLng(e),this.options.showPopup&&o&&this._compass&&this._compass.bindPopup(a())._popup.setLatLng(e)},_removeMarker(){this._layer.clearLayers(),this._marker=void 0,this._circle=void 0},_unload(){this.stop(),this._map.off("unload",this._unload,this)},_setCompassHeading(t){!isNaN(parseFloat(t))&&isFinite(t)?(t=Math.round(t),this._compassHeading=t,r.Util.requestAnimFrame(this._drawCompass,this)):this._compassHeading=null},_onCompassNeedsCalibration(){this._setCompassHeading()},_onDeviceOrientation(t){this._active&&(t.webkitCompassHeading?this._setCompassHeading(t.webkitCompassHeading):t.absolute&&t.alpha&&this._setCompassHeading(360-t.alpha))},_onLocationError(t){3==t.code&&this.options.locateOptions.watch||(this.stop(),this.options.onLocationError(t,this))},_onLocationFound(t){if((!this._event||this._event.latlng.lat!==t.latlng.lat||this._event.latlng.lng!==t.latlng.lng||this._event.accuracy!==t.accuracy)&&this._active){switch(this._event=t,this._drawMarker(),this._updateContainerStyle(),this.options.setView){case"once":this._justClicked&&this.setView();break;case"untilPan":this._userPanned||this.setView();break;case"untilPanOrZoom":this._userPanned||this._userZoomed||this.setView();break;case"always":this.setView()}this._justClicked=!1}},_onDrag(){this._event&&!this._ignoreEvent&&(this._userPanned=!0,this._updateContainerStyle(),this._drawMarker())},_onZoom(){this._event&&!this._ignoreEvent&&(this._userZoomed=!0,this._updateContainerStyle(),this._drawMarker())},_onZoomEnd(){this._event&&this._drawCompass(),this._event&&!this._ignoreEvent&&this._marker&&!this._map.getBounds().pad(-.3).contains(this._marker.getLatLng())&&(this._userPanned=!0,this._updateContainerStyle(),this._drawMarker())},_isFollowing(){return!!this._active&&("always"===this.options.setView||("untilPan"===this.options.setView?!this._userPanned:"untilPanOrZoom"===this.options.setView?!this._userPanned&&!this._userZoomed:void 0))},_isOutsideMapBounds(){return void 0!==this._event&&(this._map.options.maxBounds&&!this._map.options.maxBounds.contains(this._event.latlng))},_updateContainerStyle(){this._container&&(this._active&&!this._event?this._setClasses("requesting"):this._isFollowing()?this._setClasses("following"):this._active?this._setClasses("active"):this._cleanClasses())},_setClasses(t){"requesting"==t?(s(this._container,"active following"),i(this._container,"requesting"),s(this._icon,this.options.icon),i(this._icon,this.options.iconLoading)):"active"==t?(s(this._container,"requesting following"),i(this._container,"active"),s(this._icon,this.options.iconLoading),i(this._icon,this.options.icon)):"following"==t&&(s(this._container,"requesting"),i(this._container,"active following"),s(this._icon,this.options.iconLoading),i(this._icon,this.options.icon))},_cleanClasses(){r.DomUtil.removeClass(this._container,"requesting"),r.DomUtil.removeClass(this._container,"active"),r.DomUtil.removeClass(this._container,"following"),s(this._icon,this.options.iconLoading),i(this._icon,this.options.icon)},_resetVariables(){this._active=!1,this._justClicked=!1,this._userPanned=!1,this._userZoomed=!1}});return r.control.locate=t=>new r.Control.Locate(t),n},window);
//# sourceMappingURL=leaflet.js.map